Steps to move a Wordpress website from a local server to a production server

Steps to move a Wordpress website from a local server to a production server

Move files to the hosting environment- use git/beanstalkapp and not ftp

Create db — most likely from within mysql in cPanel

Create user to manage db — also from within mysql in cPanel

assign user to db with all rights

Change url in the db to match the new site

Upload the modified db using phpMyAdmin

Change wp-config.php to match the details of db and user just created

Check .htaccess to see if the base url is correct — /projectName or /site works only in the local environment and / is the base url for a production site if the site is hosted in the root web directory (eg. public_html)

Check url using a proxy site like anonymouse.org if the hosting shift has just happenned

To create a staging site on the same server if it is a new hosting environment the db needs to have the url of the staging site

Incase of dedicated hosting — use ipaddress of the hosting server as the url in the db

Incase of shared hosting — use the following url in the db http://xxx.xxx.xxx.xxx/~abcd where xxx.xxx.xxx.xxx is the ip address of the hosting environment and abcd is the username of the hosting account.

Sanat Hegde @Sanat