It’s time, your WordPress site gets a new domain or has to move to another server. I’ll explain how you can do it without any plugin and how the manual migration can be done without any problems.
When moving a WordPress website to a new host or to a new domain, there are some important points that should be considered so that everything works properly later. But don’t worry: I’ll show you in this post step by step how to move WordPress manually to another server or domain.
In this tutorial you will learn how to do a complete WordPress server move or a WordPress domain move. You can also follow these steps if you want to make a copy of your WordPress website. Some steps can be skipped for some cases, I have described that in the first sentence of each chapter.
WordPress Migration: Why not use a plugin?
There are some WordPress plugins that are supposed to help you migrate your WordPress installation. But some are paid or do not work properly. Therefore I find the manual migration of WordPress all the more interesting. Without a plugin, the move of your WordPress website is also quite easy to implement and you always have full control over the entire process.
Step 1: Move files to new web space
First we need to move all files to the new webspace of the new server. If you only want to change the domain of your WordPress site, you can skip this step.
Connect to your old web space with an FTP client (e.g. WinSCP or FileZilla) and download all files locally to your computer, preferably to a new folder. This may take a few minutes depending on the size of the site and the number of images. You can recognize the WordPress directory by the fact that it contains files similar to the following screenshot.
For advanced users: If you have SSH access to your webspace, you can create a tgz archive there and download it. You can find the appropriate Linux commands here.
When everything is downloaded, you can connect to the new server’s webspace again via FTP and upload everything to the root directory there.
In the wp-config.php you have to adjust the access data to the database of the new host.
Step 2: Move WordPress database
2.1 Export database
All data about pages, posts, etc. are stored in the database. This data must of course be moved. This step is not really necessary if you only want to change the WordPress domain, but I would still strongly recommend it to you, because this export also serves as a backup of your site.
For this we use the tool phpmyadmin, which you can download here. We simply put the unzipped folder into the main directory of the old site and can then access it via https://www.example.com/phpmyadmin and log in with the user data from the wp-config.php file.
In the next step we need to export the database. To do this, select your WordPress database and switch to the “Export” tab.
Type of export can remain on “Quick – show only necessary options” and format we also leave on “SQL”. With a click on “OK” we get a SQL file, which we download and upload in the new web space.
2.2 Import database
Now, who would have thought it, we need to re-import the file on the target server. For this we also put a phpmyadmin installation in the root directory of the new webspace. There we go to the “Import” tab and select our exported SQL file at “Select file”. We leave the rest of the settings as they are and click on “OK”.
And already we have the database and all WordPress files on the new server.
Schritt 4: WordPress domain rewrite in the database
This step is only necessary if your domain has changed. If your site has only moved to a new server, this step is not necessary.
To adjust the data in the database, we use the tool “Search-Replace-DB”, which you can download on GitHub.
To download click on “Code” and then on “Download ZIP”.
We upload the unzipped zip archive to the web space of the new server and call the URL in the browser.
The view will look something like this and will already automatically read the database credentials. If this is not the case, you can enter them manually and click on “update details”.
Now we enter the old and the new domain in the top line according to this scheme (old = example.com, new = test.com):
With a click on “dry run” we can display the changes. In this step no data will be changed yet! With a click on “view changes” we can view the changes and check if the domain is rewritten correctly.
If the domains have been converted correctly, we can click “live run”.
Attention: This will change data in the database. This action cannot be undone!
However, if something goes wrong, it is not a problem, because we can simply import the previous database export again.
Schritt 5: Adjust DNS settings and test page
If you have moved to another server, the IP of your webspace will have changed as well. Therefore you have to change the A-record of your domain. Your hoster will be happy to provide you with the relevant information. To understand what is behind this, I can highly recommend my article on the basics of DNS.
Finally, you can check if you can reach your site again and the WordPress move was successful.
Important: The two folders phpmyadmin and Search-Replace-DB in the root directory of your installation should now be deleted completely, so that no one can tamper with your database!
That’s it! 🙂 Moving a WordPress without plugin works very straight-forward and is also done quite quickly. If you had any problems, feel free to post a comment.
If you want to tweak your freshly moved site a bit, you can check out these useful WordPress code snippets!
What did you think of this post?