Posted: 09 November 2013, Category: WordPress
Every time I create WordPress website I always use localhost as I find it the best solution when developing WordPress website as updating changes on live web server is so time consuming.
But migrating WordPress from localhost to live web server can be tricky and I always have to look into my notes to make sure I do everything right.
There is plenty of tutorials on web telling you how to achieve this task but no set way to do it right. This post as you can assume from post title describe the method I've found the most efficient when deploying WordPress website from localhost to live web server.
List of programs needed to complete this task:
- text editor
Couple of simple steps to successfully transfer WordPress from localhost to live web server are as follows:
- Go to local phpMyAdmin, select database you want to export and click Export tab.
- Save database in convenient location in SQL format.
- Open the .sql file in your favorite text editor (Notepad++ in my case) and do search for localhost this will help you to find the localhost URL.
- Find the string you need to replace such as http://localhost/example where example is name of my WordPress folder.
- Run search and replace http://localhost/example with your domain name such as http://www.josefzacek.com.
- Save as (make a copy) updated file in UTF-8 format just in case you need to go back and make more changes.
- Login to your web server cPanel and in phpMyAdmin section create new database and user for this database.
- Once database is created import updated .sql file
- Next step is to upload WordPress files from localhost to live web server using Filezilla or any similar FTP program.
- Once upload is done open wp-config.php and update database name, database user and database password with details related to database created on live server.
- If you decided to set permalinks, your last step is is to login to the WordPress admin section and navigate to settings-> permalinks and click save changes button. This will reset permalinks to new URL.
I hope this short tutorial will help you to successfully transfer your local WordPress copy to live server without single error message.
Please feel free to contact me if you have any comments or suggestions.
Back to Blog page