How to move a WordPress Site – without plugin!

It’s time, your WordPress Site gets a new domain or has to move to another server. I’ll explain how you can do this without any plugin and how the move works without any problems.

The Problem

The problem with a domain change or a server migration are the URLs. WordPress stores absolute paths in the database that represent the main problem. That is, WordPress stores something like this in the database:

However, a better structure for a domain change would look like this:

For this WordPress would have to add a BaseURL in front of the path. This would look like this:

The Solution: Search-Replace-DB

Search-Replace-DB is a very good tool to easily rewrite these absolute links in the database.

Download (GitHub)

If you just want to know how to use the tool and have already moved your database and WordPress files, you can jump directly to step 4. For all of you who want to migrate WordPress to another server, click here:

1. Moving Files and Database

First we have to move all files and the database to the new server. Therefore you should download all WordPress files via FTP and upload them to the target server. You can recognize the correct directory by the fact that there are folders like wp-admin, wp-content and wp-includes. Copy this complete directory to the new server in the target directory.
For advanced users: create a tgz archive and load it via curl to the target server and extract it to the target directory.

2. Export database

The database contains all data on pages, contributions, etc.. These data must of course be moved. 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 call it via and log in with the user data from wp-config.php.

The next step is to export the database. To do this, select your WordPress database and switch to the “Export” tab.

phpmyadmin - Export database
phpmyadmin – Export database

Type of export can remain on “Fast – show only necessary options” and format we also leave on “SQL”. With a click on “OK” we get a SQL file.

Earn money with your website or blog

3. Import database

Well, who would have thought, we’d have to re-import the file on the target server. We load our phpmyadmin folder into the target directory and call it again. There we go to the “Import” tab and select our exported SQL file at “Select file”. We leave the remaining settings as they are and click on “OK”.

phpmyadmin - Import database
phpmyadmin – Import database

And already we have the database and all WordPress files on the new server and now we only have to take care of the actual “problem”.

4. Using the Search Replace DB correctly

We load the complete folder into the target directory and open it in the browser. The view will look like this and already reads the database access data automatically. If this is not the case, you can enter it manually and click on “update details”.

Search Replace DB Browser View
Search Replace DB Browser View

Now we enter the old and the new domain in the top line according to this scheme:

Domain replacement scheme
Domain replacement scheme

With a click on “dry run” we can display the changes. No data will be changed in this step! By clicking on “view changes”, we can display the changes and check whether the domain has been rewritten correctly.

Result after execution of Search-Replace-DB
Result after execution of Search-Replace-DB

If the domains have been converted correctly, we can click on “live run”.

Attention: Data in the database will be changed. This action cannot be undone!

If something should go wrong, this is not a problem, because we can simply import the previous database export again.

5. Check changes and delete tool

Finally you can check if you reach your page again and the conversion was successful.

Important: You should now delete the tool completely, so that nobody can mess with your database!

If you want to optimize your freshly moved site, you can check out these useful WordPress code snippets!

All content I provide completely free! If you want to support the costs for the operation and my time a little bit, you are welcome to donate me a small amount of your choice. Thanks! 💙

Related Posts
Join the Conversation


  1. My all pages are ranked at 1st page and I want to move it but I am afraid of losing all SEO effort, can you guide me how to move without effecting it?

    1. Lorenz says:

      It’s important that you redirect every page with an 301 Redirect to the new page. So every ranked page must redirect to the same site on your new domain. It should be no URL with a 404 response.

      As far as I know this is fine for Google. I have done this with several pages and never had any problems.

  2. Andy Globe says:

    Thanks for this. What is the difference for migrating to new host (and domain)? Is there any difference in steps and instructions?

    1. Lorenz says:

      When you switch to a new hoster, you don’t necessarily change your domain. In this case, only DNS changes would have to be made and the WordPress installation could be transferred 1:1. Without the adjustments shown here. Does that answer your question? 🙂

  3. Devid T says:

    I am searching on google how to migrate WordPress site to new domain and I find your post. Hopefully, now we can migrate website easily. Thank you!

    1. Lorenz says:

      Hope this post helps! If you have any questions feel free to contact me.

Your email address will not be published.

bold italic underline strikeThrough
insertOrderedList insertUnorderedList outdent indent
createLink unlink

This can also interest you