Back to Top

How To move WordPress Site from local to live server

How To move Wordpress Site from local to live server

Sometimes you want to move on your WordPress site from one server to another server. The Most complex part is database when you want to move a WordPress site to another location because WordPress save the base URL in the Database and we can say it saves the absolute path of URL instead of relative path when stores some parameters in database.Here I come with the solution to deal with such situations.

All these values in the database will need to be changed when WordPress is moved but It is not at all hard to do once you get the idea and if you are technical.

Once the site has been moved, first of all, we need to make the change on a wp-config.php file.This value can be changed via WordPress Options page, but if you no longer able to access to old site URL, you have to modify the value via MySQL database.

So, are you ready? Let’s see steps are as follows.This approach is not the new installation of WordPress.

Steps to update wp-config.php

  1. Open your database configuration file wp-config.php which is in the root folder of your WordPress.
  2. You need to replace DB_NAME, DB_USER, and DB_PASSWORD with your live server database details which you created for your new host/server and if require DB_HOST( database host name).
  3. After replacing above informtion, save the updated copy of wp-config.php

To Update the Database

To update WordPress options with the new site location, use the following SQL command.

NOTE: Make sure you have a backup of your database and copies of all your plugins and theme before you update the database. If the database transfer is not successful, will result to broke your sites.

You need to access your phpMyAdmin or log in to the DB server and upload old server database. After uploading old Database run below UPDATE Query in your phpMyAdmin. Using this, You can run WordPress site easily.

Here is the database Query to replace the Base URL of domain:

Congratulations! Now you’re done and you can go to your new WordPress blog’s URL.After you complete these steps, WordPress can be used normally.of course, You need to do some optimization.

If you face any other problems concerning the relocation of WordPress database to another server, leave a message in the comments below, I would like to sort out the issues.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

Custom Directives in Angular JS

Posted on 8 years ago

Bhumi