A client of mine has a fairly busy WordPress-based online store and blog. The time has come where the traffic justifies moving it to a VPS from its shared hosting.
I have spent some time manually setting up the VPS from a Ubuntu image and adding the following:
- Nginx
- MySQL
- PHP-FPM
- PHPMyAdmin
- Sendmail
(I followed this guide if you need details of how I went about it)
I have one vhost set up on the server which is configured to be the domain of the currently active site. I expect that if I were to change the DNS records of the domain to point to the VPS then it would direct itself to it fine.
I expect that migrating the database is a case of downloading it from the production site and uploading it to the VPS using phpmyadmin.
Then I hear it can be good to edit the wp-config file on the shared hosting to use the database on the VPS so any updates will be saved on the new database.
Next step is to copy the contents of the public_html folder and upload to the VPS. Then edit the wp-config on the VPS to work with the local database and finally edit the DNS settings.
Here are my worries/questions:
- How can I be sure that when I make the 2 main changes: change the database used, and change the DNS record of the domain, that all will work OK. There is no way to test if it'll work without trying and potentially causing significant downtime.
- The site relies heavily on emails for confirming ecommerce orders and notifying users. I have sendmail on the VPS but with no domain name on it I can't seem to test email delivery as there is no FQDN to use - all emails from the server either don't send or get caught in spam filters before they even reach their destination (I don't know). Emails must work as long as the site is up or disaster. The emails will always be coming from mydomain.com but do not know how to configure sendmail to have emails send reliably with or without the FQDN.
I know this is a bit open-ended but if anyone can at least point me in the right direction with regards to the 2 points above I'd be grateful.