Hello friends, today I will show you how to move wordpress site from localhost to live server. Many people like to build their wordpress site locally and once they have finished the event on localhost, consecutive step is to maneuver the positioning live. This tutorial I will show you how to move wordpress site to live server, database and all. By exploitation this method, you’d be ready to migrate all of your content (posts, pages, images, etc), themes, similarly as plugins from native server to a production website.
I assume, you build a wordpress site in your local server. Now you transfer your local site to live server. You would need to have a FTP program to connect your local system to live server. For that you have to know how to use ftp, so you can connect your local system to live server, upload your content to the live site. For ftp you can use filezilla. It is free software. Now I start the process.
Step 1: Export Local WordPress Site Database
First thing you would like to try and do is export your native WordPress database info. We’ll be using phpMyAdmin to try and do that. Now go to http://localhost/phpmyadmin and select your localhost joomla database. Next, click on the “Export” button from the top menu bar.
In the Export Method option chooses “Quick – display only the minimal options” and select format “SQL” and click on “Go” button. It will download your whole database. We need this file for later use.
Step 2: Uploading Local WordPress Files to Live Site
Now open your ftp software (For me it is filezilla), put your live site hostname, username and password and click on “Quickconnect”. It will connect your local system to live server.
Now go to your live server root directory, for me it is “www”. It varies on server to server. So you have to know your root directory. Now left side of your filezilla you have to select your local joomla site and right side of your filezilla your live server root folder. Now select all files from left site of filezilla and right click on files and click upload.
Step 3: Create Mysql Database on Live Server
While your FTP client is uploading your wordpress files, you can spend this time on importing your database to the live server. Log in to your cPanel using username, password. After login you are now in cpanel dashboard. Now click on the MySQL databases icon which can be found in the databases section.
It will open an window, Click on “Go back”.
Step 4: Importing WordPress Database on Live Server
This will take you to phpMyAdmin where you want to click on the database you created earlier. phpMyAdmin will show your new database with no tables. Click on the Import tab in the top menu. On the import page, click on choose file button and then select the database file you saved in step 1. Lastly, press the Go button at the bottom of the page. phpMyadmin will now import your wordpress database.
Step 5: Changing the Some URL
Now You have imported the database, and all of our table should be uploaded. After importing finish, click on “SQL” tab, remove the text and then paste this code.
UPDATE `wp_options` SET `option_value` = ‘http://www.example.com’ WHERE `wp_options`.`option_id` =1;
UPDATE `wp_options` SET `option_value` = ‘http://www.example.com’ WHERE `wp_options`.`option_id` =33;
Replace http://www.example.com to your website address.
Now open wp-config.php file from your right side of filezilla, put the database name, user and password. For user and password, it will be your cpanel username and password. Save the wp-config.php file and upload it back to your server. Visit your website, and it should be live now.
Login to your WordPress admin panel, and go to Settings -> General. Click save Options. This will ensure that the site url is corrected anywhere else that needs to be. Then go to Settings -> Permalink and click Save to ensure that all post links are working fine.
Now you understand how to move WordPress site from localhost to live server.