How to Move WordPress From Localhost to Live Server

Beginners usually face problem while transferring their WordPress site from localhost to Live Server. Follow this quick guide carefully and perform the steps as mentioned so that you don’t mess up while uploading your WordPress site files to the server.

Suggested Information : How to Install Sublime Text Editor on Linux

Step 1: Exporting Database

  • Goto http://localhost/phpmyadmin/ from your browser
  • Select your database which contain WordPress data
  • Click on Export tab and enter the format choice to Sql
  • Click on Go button.

You are now provided with a sql file .

Step 2: Changing wp-config.php

  • Change the DB_NAMEDB_User and DB_PASSWORD with your DatabaseUsername and Password.
  • Hostname may not always be localhost. It might vary depending upon the webhosts.

Step 3: Uploading Files to Server

  • Now upload the WordPress directory to the root directory of your server.

Note: If you do not know how to upload files to server, here is quick tutorial that shows how you can connect to your server using FileZilla.

Step 4: Updating Database in Server

  • Visit phpMyadmin in your server
  • Now select the database which you want to use for your WordPress Site
  • Click on Import Button and import the sql file which was exported in step 1
  • Now, Goto wp_options table and change the link of home and siteurl.  Eg,
  • Click on SQL tab and paste this command,
UPDATE wp_posts REPLACE(post_content,'localhost/abc/', '');

Where abc is your WordPress directory in your root directory of Apache Server in your PC. This will automatically replace all the broken links with your new url path.

Suggested Information : How To Install Google Analytics On wordpress

That’s it! You’ve successfully moved your WordPress from your Localhost to live Server.

This is the basic information about how to how to move your wordpress form your localhost to live server. For more related technical article please check the blog.

You May Also Like