I use InfiniteWP to manage sites for my clients. Generally speaking, its backup and restore functionality works out of the box.
However, one of my clients didn’t pay their bills, shut down their server, and deleted it. Now they wanted it back online, thanks to a change of heart. I developed this tutorial as a result of my dilemma in spinning up a new instance and deploying the site again using those same backup files. After a lot of tinkering, I found this method worked relatively well for a manual restore.
Step 1: Locate Backup Files
Begin by locating the InfiniteWP backup zip files. These are essential for the restoration process and typically stored in a safe location.
Step 2: Extract Backup Files
Extract all backup zip files to uncover your website’s files, including an
iwp_db folder containing SQL files for your database.
Step 3: Merge Site Directories
Combine all extracted folders into a single directory. This consolidates your website’s files, preparing them for restoration.
Step 4: Combine SQL Files
Go to the
iwp_db folder and merge all SQL files into one using the
cat command on Mac/Unix or the
copy command on Windows. Ensure the files are combined in the correct sequence to maintain database integrity.
Step 5: Create a New Site in Local WP
Install Local WP and use it to set up a new local environment for your site. This application simplifies local WordPress development and restoration.
Step 6: Import the Database
- Open Local WP and navigate to the Database tab.
- Launch Adminer from within Local WP and select the import option.
- Import the previously combined SQL file into the database of your new local site.
Step 7: Update the WP-Config File
- Locate the
wp-config.phpfile within the
app/publicdirectory of your new site in Local WP.
- Copy the database connection details from this file to the
wp-config.phpfile within your merged site files.
- Empty the
app/publicfolder and move your merged site files into this directory.
Step 8: Update Site URLs
- Access the site shell in Local WP.
- Update your site’s URL settings using the following WP CLI commands:
wp option update home 'http://yourlocalurl.local'
wp option update siteurl 'http://yourlocalurl.local'
- Perform a search and replace for all instances of your old domain to your new local domain using:
wp search-replace 'http://yourolddomain.com' 'http://yourlocalurl.local'
For detailed commands and usage of WP CLI, refer to the WP-CLI Documentation.
Step 9: Fix URLs with Elementor
- Log into the WordPress admin area of your local site.
- Navigate to Elementor > Tools > Replace URL.
- Input your old and new URLs to update all instances across your site.
Step 10: Install Duplicator Plugin
- Install the Duplicator plugin on your local site.
- Create a Duplicator package, which will encapsulate your entire site for migration purposes.
Step 11: Restore Your Site Using the Duplicator Package
Utilize the Duplicator package to migrate your site to its final hosting environment, completing the restoration process. If you have the premium version of Duplicator, you can install the plugin on the new server’s WordPress instance and just drag-and-drop the zip archive.
And there you have it, your website restored meticulously from InfiniteWP backups. This is more annoying than it should be but at least the site is up and running again.