How to Move WordPress From Local Server to Live Site

As a developer, most of us prefer to develop the website using localhost on their computer. There might a question about How to Move WordPress From Local Server to Live Site? So, after finishing the project on the local computer it need to be upload to the live server and make the project live.

In this post I will explain the process of transferring wordpress website from localhost to live web hosting.

For this tutorial I am using XAMPP, FileZilla FTP client and mac OS X.

1. Upload all file using fileZilla

First of all, we need to have web hosting (If you don’t have hosting, then you can get it from Bluehost) and we can use FileZilla to transfer the file from localhost to the web server.

uploading wordpress to live server

Upload all the files (includes all the folders) from the localhost to the server.

2. Configure MySql Database

After updating all the files on the root directory of the server, we need to create a database which will be linked to our wordpress website. For this, we need to export database from localhost and then import the exported sql database to server.

Open localhost on your XAMPP and export the database.

export SQL database from localhost server


Now, login to your web hosting server and import the same SQL database which you have exported from the localhost.

3. Configuration

Now, update the login details in the file config.php (update all the login details of the live hosting server)

Goto the database in the live server and write the following sql

UPDATE wp_posts SET guid=REPLACE(guid,’New live server address’,’Old local server address’);

This will update all the localhost settings which was there in the database.

Also, need to change the localhost/yourwebsite to exact yourwebsite.com so find table wp_options in the database and open the table and edit it with your new domain name.

Finally, your website is ready. Open the browser and type your web address, wohoooo your localhost website went live.