If you are working on developing a WordPress website locally, one way or another you will want to put your entire website on a real server, for showing it to your client or to enable the website in « production mode ». It is an action you’ll have to run several times for each website you’re developing, but if you are like me, you’ve never (until today) create a « todo reusable list » which will greatly simplify this process.
To move wordpress from localhost to a server, just do these things:
- Connect yourself to your local database (phpmyadmin) and export your local WordPress database.
- On your server, connect yourself to your online database (phpmyadmin), and create a new database.
- On your server’s phpmyadmin, upload your local WordPress database to the database you’ve created.
- Take the entire WordPress local directory you are working on, and open wp-config.php (it is on the root of your local WordPress directory).
- Edit MySQL settings to match the settings of your new online database (the one you’ve created on 2):
- Upload the local WordPress Directory (with edited wp-config.php) to your server.
- On your server’s phpmyadmin, on your new database, you will have to run a SQL command script to change all the old local url to your new online wordpress site. Just run the script below (SQL tab on phpmyadmin). You must change http://www.oldwebsite.fr with your local WordPress url, and http://www.newwebsite.fr to your new online WordPress url. Don’t put any trailing slash at the end of url, and don’t edit anything but the url. The SQL command script:
- Just chill out waiting for your customer to send you his review.