If you’ve decided to move your blog to a new web hosting, the most important thing is how to restore a WordPress blog without downtimes. The good news is that you can make a fast and easy migration without, and best of all, you don’t need to have a full backup of your blog, all you need is the most important files and the database to restore your site as it worked on the old server exactly.
You can also read: How to restore a Website without backup.
The biggest mistake that new bloggers still making is to forget their backups and even neglect them. This is why you should backup your blog files everyday and even create manual backups from time to time to avoid problems.
Forget everything you’ve learned about backups and complicated things and details that you can’t really understand or manage, to restore your blog and make it works again fully without any issue, you need the following files from your old server or backups:
- Uploads: Your ”Uploads” directory is where your blog restores images and other files. You need that folder to restore all your blog posts images and features images.
- Database: You should have a database copy, your database saves your blog posts including, tests, comments, links and everything else. Also, you can find other data in that database. If for any reason you don’t have a database backup.
- Themes (optional): You can restore a WordPress blog without this folder, but you need to upload your theme and settings again. That can cause some problems when losing the theme settings.
- Plugins (optional): As themes, you don’t need the plugins file if you have a few plugins without settings. But, if you have lots of them, then I recommend having the plugins file, it will help.
As you can see you, don’t need all your blog files, and the home directory because you can restore a blog in a new and fresh installation without complicated things. Now follow, me and let’s restore your WordPress blog.
Download the above files if you don’t have a backup
(If you have all the above files, skip this step)
If you don’t have the 4 above elements to create a restore, you can download the through your cPanel account or FTP. All you have to do is login to cPanel, then open the ”file manager”.
Now you have all your blog files, but we only need 3 and the database. Find the file Uploads located in the ”wp-content” folder, then download it or create a zip copy and download it. The two ways works, but if you have a slow internet with large files to download, then, you need to create a zip copy of each file, then download that zip file.
Now you have 3 folders (uploads, themes, plugins) and you need to download the fourth one which is the database, so come back to your Cpanel account and click “Backup wizard” icon as below:
On the next page, you get two options, restore or Backup. Of course, you need to Click backup, then, select the MySQL database only:
Now click on your database name, and it will be downloaded automatically to your computer. Thus, you have all the files to restore your WordPress blog.
Restore your Blog
Before starting the restore steps, you don’t have a need to change your domain name servers. You can do that after completing the migration, you can have an actual blog working, and another copy in the new server waiting for the name servers to be pointed the new hosting.
I have advice for you, to guarantee a zero downtime, you need a free CloudFlare account or a CDN account as well, or a DNS manager simply. When you complete the migration, just change the IP address in your Cloudflare domain DNS settings. That way, your blog still working, and you can see your blog in the new server in a few minutes.
To start restoring your blog, create a new WordPress installation on the new server, you can learn more how to start a blog with the installation guide.
Now, you have a new installation, the next step is to delete the ”Upload”, ”Plugins” and ”Themes” folders from the new server, and replacing them with your old folders, that you have downloaded.
Now, you need to upload your old database, and move it to the new server. The easiest way is to delete the new database content, and replace it with the old database, this way, you don’t need to edit the database details, or change any other file. So, come back to cPanel and click on ”PhpMyAdmin” icon:
Next, you will get a page with the database name on the left page, click on it.
You will see tables with lots of details, all you have to do is to select all those tables, and click drop to delete them at once:
Stay on the same page, you should upload your old database that you have downloaded to the empty tables. To do that, click ”Import” at the top of the page:
Select the downloaded database from your computer and upload it there. It’s in SQL format, after successful upload, you will see a green confirmation message.
Congratulations, you have restored your blog. Now, change your old server IP with the new one, you can find it on the left page from your cPanel account. Or, if you don’t have A CDN or Cloudflare accounts, just change your old domain name servers, with the new ones in your domain name provider account.
Wait until the propagation process finish. It takes some minutes with CloudFlare, and from 30 minutes to hours, if you changed the name servers in the domain name provider account.
After the migration step, resetting Permalinks
Your blog posts will get a “Page not Found” error, and this is normal because every new migration needs a permalinks reset. All you have to do is login to your blog dashboard, click the “Settings”, and “Permalinks”. Then, just save the changes and WordPress will generate new settings with your blog posts URLs. Click on any post in your blog, and it should work properly without any problem.
Fathi Arfaoui: A Physicist, founder and owner of Trustiko.com. He shares Business, WordPress, Web Safety, and Blogging tips to build better websites and blogs. Thus, you will succeed online with the right marketing strategies and recommendations. Of course, you’ll find much more topics.