I am in the middle of a migration process from a shared hosting (bluehost) to a VPS server. Actually it is a follow-up question to a previous post for the same site.
So it is a WordPress multisite that I need to migrate to the VPS. So far I did the following:
-
Backup content and database files from the LIVE site, let’s call them
wp-content.zipandbackup_db.sql. -
Created the website using EasyEngine, thanks to EE technology, for multisite subdirectory WorPress installation:
sudo ee site create example.com --wpsubdir -
I am migrating to the same domain name as before
example.com. -
I took note of all credentials in the
wp-config-phpfrom the LIVE website to replicate them in theee-created site, ie. database username and password. This is documented here. Question: do I need to replicate the WordPress admin username and password too like the LIVE website, how to set these in theeeduring site creation? -
Now I can open the blank website created by
eefrom my local machine AFTER editing editing the/etc/hostsfile. So far so good. -
I transferred the
wp-content.zipand unzipped that correctly replacing thewp-contenton the new server. The transfer worked well, since I could see my files in theMediafrom inside the newly created WordPress site. Question: the LIVE website has the following folder structure:public_htmlfolder which containsmisc files, e.g. .htacces, etc+wp-content+wp-includes+wp-admin+cgi-bin. While theeesite structure is the following:var/www/example.com/htdocs/wp-contentsort of thing. I wonder what should be transferred specifically to the new server apart from thewp-contentand whether I should adapt anything related to the changed path aspublic_htmlno longer exists on the new server (target website). -
I added the subdirectories of the newly created website network, nothing more.
-
After having my
backup.sqltransferred to the new server, I imported the database using this line:mysql -h localhost -u db_name -p db_username < backup.sql -
I didn’t need to adapt the
wp-config.phpon the new server as it is referring to the same LIVE site MySQL database name and username, even password (is that really necessary, can one just rename everything to reflect the new names?!)
After doing all this, I can no longer open the website from my local machine it will direct me automatically to the LIVE website, so my guess the problem appeared after transferring misc files in the public_html path to the new server replacing everything similar there. It could be the .htaccess or others I don’t know. Any idea please?