How to transfer WordPress to another domain

Firstly, you must make a backup copy of the database and www directories.

Then, links to files and pictures in articles, as well as in menus, widgets, etc. can be done without an absolute path, for example, not, but /wp-content/uploads/2020/01/img.jpg.
If there are many links, then you can quickly change them, for example with the Velvet Blues Update URLs plugin.

Now I will describe the points:

1) Transfer the www directory of the site files to the new server (if you only change the domain of the site, then this is not necessary).

2) Create a new database, user and password, and transfer the database, if the password or user is not the same as before, then we will also change them in the wp-config.php file (if you only change the site domain, you do not need to do this).

3) In the database, change two URLs in the wp_options table, namely in siteurl and home.

4) Well, it remains to clear the cache directory in the wp-content directory, as well as the browser cache, and you can open the site at a new URL.

Also, in the root of the site, let’s see the .htaccess file, whether there are redirects in it with the old URL.

Leave a comment

Leave a Reply