First create a zip file of your complete localhost's Wordpress website. Now login in cpanel of your website and search the File Manager in search bar and click on file manager icon. A new tab will be open for file manager.
On this screen open the public_html folder and then click on Upload option to upload your webiste's zip file. You will be redirected to the new tab, Select zip file from your computer to upload. After complete the file upload go back to the file manager page and select the uploaded zip file and extract in the public_html folder.
Now open the wp-config.php
file from root directory of your website and change the database configuration. Change the database host name, database name, database user, database password and save this file.
[crayon-585f8606e41cb695127732/]
How to export MySQL database from PhpMyAdmin
Now visit PhpMyAdmin => select your database => click on export option => select .sql file and click on Go button.
How to import MySQL database using PhpMyAdmin
Open PhpMyAdmin from your cpanel and select your database and click on Import option. Select the .sql file from your computer and click on Go button.
Select database and open the wp_options table. Replace the option value of siteurl and home
with your live website url.
Conclusion
Hope this post helps you to host WordPress websites from localhost to live server. Still need help to upload a WordPress website to a server, feel free to add your comments in below comment sections. Do you like & share this article with your friends, and don't forget to follow us on Facebook and Twitter to learn cool WordPress tutorials.
The post How to host WordPress website from localhost to live server appeared first on Programming Blog.
This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here