When you start to develop a lot of WordPress themes, you will find your natural rhythm moving sites from local development to live testing or production environments.
Here is a simple 10 step process for doing just that. The process works even if the sites have different URLs.
- Backup your WordPress site using WordPressBackUp or another backup plugin that gives you a file and database backup.
- Download and unzip this backup on your desktop (or wherevs)
- FTP in to your new server and upload all the files from the backup, except for the database file ending in .sql
- Login to your hosting control panel and create a new database. Make sure to note the db name, username and password.
- Navigate to phpMyAdmin from hosting control panel and upload the .sql file from the backup.
- Open up the wp-config.php file on the server
- Update the database information in the wp-config.php with the new database info you just setup.
- Add the url to the site in the wp-config.php file
- You should now be able to go to the live WP site and login
- Install the Search and Replace plugin and do a find all and replace for “http://your-local-url.com” with “http://your-live-url.com”
The last step fixes hardcoded links in your database to media that was uploaded during local development.