While uploading website from local to live, gives lots of headache and trouble to everyone. Here is the tip, how you can get through and make your website live.
First Step:
Import a MySQL Database using phpMyAdmin
Before uploading a database from computer to host, you must create new database in server. Click MySQL Database and create a new database.
As shown in above image, create new database and click create button. After that, upload the database that you have backed up in sql format.
- Open phpMyAdmin by selecting phpMyAdmin icon
- Select the database in the left menu that you will be working with
- Click Import in the top menu
- Under File to Import, click Browse and select the backup file you previously created (it will be either a .sql .zip or .tar.gz file).
- Click Go at the bottom right
When the database has been imported successfully, you should see a message at the top of the page similar to: Import has been successfully finished, ## queries executed.
Then you will see the tables same as you have developed. Before proceeding further, make small changes in the value of option table.
Change the value localhost/yoursite to -> www.yoursite.com
After that upload your WordPress site to host with the help of FileZilla.
See the image that you help to get some information:Upload your complete WordPress Site, now you will get the actual error because of which you will not be able to run website.
Now you have to make certain changes in the files that you have uploaded. See the wp-config and wp-config-sample files. Edit the files, replace the database details with that of actual with that of server.
/** MySQL database username */
define('DB_USER', '_______');
/** MySQL database password */
define('DB_PASSWORD', ' ______');
/** MySQL hostname */
define('DB_HOST', 'localhost');
Do not replace the host, in 99% case localhost works.
Now your WordPress site is ready to go,but there is one more thing that you must change (i.e. links)
And finally, one more thing
Login to your Dashboard (www.yoursite.com/wp-admin.php)Go to : Settings -> General
There change site address (URL) from localhost to the same as WordPress Address (i.e. http://www.yoursite.com)
Save it.
Here you go, your WordPress site that you have developed locally, now runs LIVE.