1. Create the new domain on the new server (i.e. create the CPanel account)
2. Copy the files into the /public_html (or whatever dir you’re using for root)
3. Create a new database on new server and import MySQL file
4. Edit /wp-config.php and change the DB_NAME, DB_USER & DB_PASS settings to the new db you just created
5. Update the DNS and point the A Record and www CNAME record to the new server IP address.
Done – that’s it (If you are using the exact same domain name and installing in the same root directory i.e if site was on https://www.domain.com/wp then make sure it’s the same on the new server)
]]>If I understand, your approach does not install WP using cPanel on the new hosting account, but instead, WP gets installed by coping all the files and creating a new db. I’ll recreate the db and do the import again.
Step 4 is where I got confused. I know the name, pass, and user, but the wp-config.php had a long host name that seemed to be from the old db.
I’ll record the host name before and after the import to see if it changed.
Please hang in a little bit longer while I get the process figured out.
Thanks again!
]]>Created a new MySQL db and imported export from old db (looked at the user table and it has the users from the old installation).
Added dbName, user, pswd to config. Interestingly, the config file has a long host name, yet the config_sample shows that field as “localhost”. MyPHPAdmin says the host is “localhost” so I changed the host name to ‘localhost’.
Tried to logon to WP and got this error:
Warning: Cannot modify header information – headers already sent by (output started at /home/wizardclown/public_html/carpenter/gmvuac_wp/wp-content/themes/hashi/functions.php:627) in /home/wizardclown/public_html/carpenter/gmvuac_wp/wp-login.php on line 390
Warning: Cannot modify header information – headers already sent by (output started at /home/wizardclown/public_html/carpenter/gmvuac_wp/wp-content/themes/hashi/functions.php:627) in /home/wizardclown/public_html/carpenter/gmvuac_wp/wp-login.php on line 403
]]>Modified config file to connect to new db.
Got the same message (hashi is the active theme).
Not sure where the error is.
Tom
]]>As for the error: check the file on the line specified:
/home/wizardclown/public_html/carpenter/gmvuac_wp/wp-content/themes/hashi/functions.php:627
Your functions file is trying to do something that it can’t on this server.
]]>Are these done using cPanel?
The domain name changed, as did the server.
I’ll review some of the articles to see if they explain in a way I can follow.
Line 627 of the function.php file is the last line in the file (and is blank). Looked at the 2 lines in login.php. Don’t totally understand, but the keywords “server” and “path” are in the area of the specific lines.
Again, may be things needed in your step 5.
Thanks for your continuing help.
]]>The 2 A records (@ and admin) both have the new server IP address. The CNAME www record is @.
Does that help?
Is it possible the MySQL export/import wasn’t right? In other words, I took all the defaults for the export except the DROP option, which appeared to be important from something I read.
]]>Do I edit? Was this avoidable (e.g. different options for export/import)? Almost feels like I could have made the change from within WP on the old site (after all the files are downloaded). The export would then have the domain/url for the new server.
]]>I assumed that you were just moving the site (domain included) to the new server. THe DNS is irrelevant then if you’re using a new domain.
Also, yes, you need to go through and update all your URLs to the new domain
In settings and also in each page