Migrate your WordPress in 10 easy steps

Most of the web site migrations on Adriahost are WordPress migrations. Users are moving from different platforms, panels, configurations, somebody can do that easily, somebody needs more time and help, and we are here for that to help and guide through the migration process.

During our many years of experience, we often encounter one problematic scenario. The problem for the user encounter when the web site is created in some folder, example /blog, on one hosting and want to migrate that website to another hosting on the new domain. In this case, link replacement needs to be set correctly or the web site can’t work on the new domain. In order to all that goes right, this is what is need to be done:

First step

Before you start with WordPress migration, place the robots.txt file on the new hosting with the following content:

User-agent: *
Disallow: /

Second step

Copy the database and web site files from the old hosting to the new hosting (using PHPmyAdmin, cPanel, FTP, SSH or any other method). If you use PHPMyAdmin you can export the database with an Export option on the old hosting and you can import that database with Import option on the new hosting. Files from the old hosting pack into a zip or tar.gz package and download to your computer. That package you need to upload to the new hosting and extract the files.

Third step

Edit wp-config.php file with new data about the database. This is the data about the new database that is created on the new hosting.

If your web site is created on one address, and after migration needs to work on new address (domain) you need to place those two lines into wp-config.php file:

define('WP_SITEURL', 'http://www.your-new-domain.com');
define('WP_HOME', 'http://www.your-new-domain.com');

Pay attention to replace “www.your-new-domain.com” with the name of your new domain.

Fourth step

Go to your WordPress site (on the new domain) and login into Dashboard. You can delete any cache files if you use some cache plugins.

Fifth step

Install Better Search & Replace plugin. With this plugin, you can replace all the links from the old domain to the new domain name in your database. In case that your site is created on “old-domain23.com/blog” and now need to work on “new-domain24.com”, you need to do Search for: old-domain23.com/blog and Replace with: new-domain24.com.

Sixth step

After that, create a double check of your WordPress web site. Check all the links, images and articles.

Seventh step

Now remove the robots.txt file from new hosting.

Eight step

On your old hosting, place .htaccess file with the following redirection rule:

Redirect 301 /blog/ https://www.your-new-domain.com/

Note: replace “/blog/” with the name of your folder (where the site files was), and replace “www.your-new-domain.com” with the name of you new domain name.

Ninth step

Remove the web site from the old hosting, but leave .htaccess file with the redirection rule.

Tenth step

Create a double check again. If you do not manage well, and you want to migrate your site to Adriahost hosting, we can migrate the WordPress site for you. You just need to contact us to let us know that.


Tags: , , ,