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.zip
andbackup_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-php
from 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 theee
during site creation? -
Now I can open the blank website created by
ee
from my local machine AFTER editing editing the/etc/hosts
file. So far so good. -
I transferred the
wp-content.zip
and unzipped that correctly replacing thewp-content
on the new server. The transfer worked well, since I could see my files in theMedia
from inside the newly created WordPress site. Question: the LIVE website has the following folder structure:public_html
folder which containsmisc files, e.g. .htacces, etc
+wp-content
+wp-includes
+wp-admin
+cgi-bin
. While theee
site structure is the following:var/www/example.com/htdocs/wp-content
sort of thing. I wonder what should be transferred specifically to the new server apart from thewp-content
and whether I should adapt anything related to the changed path aspublic_html
no longer exists on the new server (target website). -
I added the subdirectories of the newly created website network, nothing more.
-
After having my
backup.sql
transferred 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.php
on 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?