Migrate your WordPress in 10 easy steps

by | WordPress Tutorials

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.

SUBSCRIBE NOW FOR NEW POSTS FROM OUR BLOG!

Slični tekstovi:

15 useful tips and tricks for wp-config

15 useful tips and tricks for wp-config

This file, wp-config.php, is important for the functionality of the whole WordPress site. That file contains data about the database, database user, database user password and other settings. It can be used for...

Migrate your WordPress from HTTP to HTTPS easily

Migrate your WordPress from HTTP to HTTPS easily

HTTPS protocol on your WordPress is one step closer to better security for your web site. Besides that, Google emphasizes web sites with HTTPS in Search results. Yes, Google gives help to the web sites with HTTPS...

WordPress installation and few tips for better start

WordPress installation and few tips for better start

WordPress installation guide step by step is useful if you plan to create your new website by yourself. Here we wrote what you need to do so you can start using all the benefits of WordPress. Step 1: Forbidden is OK...

0 Comments