Why am I having trouble transferring my Wordpress site to a different host?

I've been tasked with moving a Wordpress site to a new host. I've got a rudimentary knowledge of Wordpress and I wouldn't think that moving the files and updating the database config file would be especially difficult. But I'm apparently missing something and I need some input.

The current site is https://www.studweldfast.com/. After copying all the files and changing the database to the correct settings, here's what I'm looking at: http://weldstudpro.com/.

The theme appears to be Executive Pro. I've activated that theme and I'm still looking at something that doesn't come close to the original / what I'm expecting. I've been able to locate the images that I would expect to be present and they are on the new server, but nothings being displayed.

What am I missing?
Bruce GustPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Depends on what you mean by "changing the database to the correct settings".

If you mean you use phpMyAdmin to search + replace www.studweldfast.com -> weldstudpro.com then you'll be in trouble because phpMyAdmin isn't serialized data aware.

If you used wp-cli or a serialized data aware backup plugin then all should be well.

The http://weldstudpro.com looks like a fresh WordPress install, which might relate to the theme you mentioned failing, in which case WordPress will attempt to fallback to a working theme + site will be mangled.

Start by describing the exact steps you took to backup your database/files, move backup to new hosting, restore backup, rename site to new domain name.
Julian HansenCommented:
If you are changing the domain name then you need to update the database to correct all the old links and update them to the new.

There are various ways of doing this.

Plesk has a WP Toolkit that allows you to clone WP to a new location - it will update the database for you.

There are various Plugins out there that will allow you to backup and restore to a different host.

There is the Wordpress CLI which will allow you to update the database with the new links.

If I don't have access to the Plesk WP Toolkit (mostly host on CPanel) I use this process. It is a bit hands on but it works.

It is easier if you have SSH access to the site but if you don't you can still do it locally

1. Backup source Database
This can be done with PHPMyAdmin, a tool like SQLYog or on the command line with
mysqldump --databases DATABASE -u USERNAME -p > dumpfile.sql

Open in new window

2. Tar/zip the WP files
tar -czvf wp-backup-YYYY-MM-DD.tar.gz .

Open in new window

3. Copy both of these locally.

4. On your local (or target server if you have terminal access) create and import the DB

5. Extract the WP tar.gz to a folder on your Workstation

6. Update the wp-config.php file database settings to point to your local instance of the database

7. Install the Wordpress CLI

8. Run the following command from the root folder where you unzipped your WP files (same folder as the wp-config.php)

wp search-replace --allow-root --url=studweldfast.com studweldfast.com weldstudpro.com

Open in new window

9. Export your (now updated) local DB

10. Copy the tar.gz to the target server and extract

12. Import the updated DB you dumped from your local database.

12. Update the wp-config.php to point to the database on the new server

13. Check your .htaccess - it should be fine though because both sites run out of the route - but in case there are any domain specific rules you might need update.
Bruce GustPHP DeveloperAuthor Commented:
#1 copies all existing files to new server
#2 set up new database and imported the backup sql
#3 went to new site and instead of seeing the content I expected,  was greeted with a generic screen that had me set up my new Wordpress site login.
#4 convinced that something was wrong after I set up login etc., I went back and looked to see what theme was being used on the original site. Went to new Dashboard and made sure that theme was activated. The new site's appearance was altered but still a far cry from the original site
#5 logged into Experts Exchange and put in a call to the ninjas...
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Bruce GustPHP DeveloperAuthor Commented:
Julian, I'm smelling what you're cooking!

It seems like WP has a utility that clones a website and you reference that.

The original webmaster did include a .tar file. Originally, I went with the .zip file he gave me because the .tar.gz file looks like this:

It's an incredible assortment of things that I don't recognize as being relevant save the one file that I have highlighted which is the actual site files.

I've got the client on a Godaddy site and it seems like they've got a pretty verbose WP utility. Perhaps I should start from scratch and look for the "cloning" mechanism you reference?
Bruce GustPHP DeveloperAuthor Commented:
I checked with the Godaddy utility I was thinking about and it looks like I made a bad situation worse. I moved the files that were originally submitted to me to a directory called "Wordpress" on the new server, thinking that the content was there, it was just a matter of allowing a WP utility to access them and install them correctly.

I directed the new install to place the files in the home directory, which didn't seem to work, and this is what I got:

It shouldn't be this hard...
Bruce GustPHP DeveloperAuthor Commented:
Julian, I do have access to a CPanel, this is how it looks:

another screenshot
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Tip: Based on your comments I'd suggest you use a WordPress backup plugin, rather than doing manual steps.

This will be easier to keep straight.

This will also handled the serialized data aware search + replace to change your domain name.

Use a plugin like Duplicator or BackupBuddy.

Tip: The way I setup new sites... sometimes 100s/day... is to always get the site serving an empty directory with SSL working first.

This way you know you're working with the correct directories with your new hosting.

In your list above, #3 went to new site and instead of seeing the content I expected,  was greeted with a generic screen that had me set up my new Wordpress site login is where you should stop. If you get to this point + don't see your site, don't do a fresh install, because how you have another database hanging around somewhere, which will be orphaned when you get your migration working.

Having orphaned databases can cause massive future confusion.

Best you start your next migration by deleting the fresh site install you did - including all files + database, so you have a empty directory serving via HTTPS.
Bruce GustPHP DeveloperAuthor Commented:
David, I'm going to do it! It seems like I did something with Wordpress similar to this and it was a utility that got everything done as opposed to a manual process.

Just to explain back to you what you said:

  • Delete everything, including the database (doing that now even as we speak)
  • Using the WordPress app that's on my cPanel - install WordPress
  • Open up WordPress and install either Duplicator or Backup Buddy
  • Use one of those utilities and they will ask for my files at which point, I just point to that directory and they take it from there

David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Well... your steps are... close...

1) On your existing site https://www.studweldfast.com install a backup plugin.

2) Make a backup.

3) Download the backup zip file.

4) Download the backup installer.php (or similar) file.

5) At your new hosting, remove the database created before (which contains the fresh install data) + files.

6) At this point at your new hosting you'll have a bare directory serving serving via HTTPS.

Make sure you have this step working before proceeding, so HTTPS + empty directory working.

7) SFTP #4 + #5 you downloaded to your new hosting.

8) Now when you visit your HTTPS empty directory you will see 2x files - zip file + installer file.

9) Create your new empty database using CPanel or phpMyAdmin or however seems best.

10) Click on http://weldstudpro.com/installer.php to start the installation process.

11) Answer any questions.

12) You're done. No other work should be required at this point.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bruce GustPHP DeveloperAuthor Commented:
David, you're awesome!

Thanks for spoon feeding me all of this!

I found a "backupbuddy.php" file! Having read through your steps I realized that this was probably the "thing" I was looking for. I watched a tutorial, but I think I missed something.

I uploaded the zip file. I found a "backupbuddy.php" file and I retrieved it from the wp-content/plugins/backupbuddy directory.

This smelled like success!

But after I uploaded the zip file and then the "backupbuddy.php" file on to the main directory, I tried to access the actual page and I got a "couldn't be displayed" error.

What did I do wrong?
Bruce GustPHP DeveloperAuthor Commented:
I did find another file that looked a little more "obvious," perhaps. It was in the main directory and it's the MOJOWordpressInstaller-wOMF5tizRf.php.php file.

I don't know...
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
To use BackupBuddy requires purchasing a copy.

If you have some file called backupbuddy.php this is likely some hacker provided backdoor, which you should not use.

Use one of the following or many other good backup plugins from https://WordPress.org/plugins will also work. I stick with Duplicator, as it seems to work in more situations.

BackupBuddy lives here (paid software).

Duplicator lives here (free software).

Whichever plugin you chose, visit YouTube + you'll find detailed walkthrough videos for pretty much any backup plugin.
Bruce GustPHP DeveloperAuthor Commented:

I was able to make some significant progress!

Here's what I did:

Manually copied all of the elements into the new hosting service
Opened up the .sql file and made sure table names were consistent with the config file
Went through the sql and changed any reference to the original domain to the new domain
Set up a new admin so I could log into the dashboard and make the necessary updates so I could match the original aesthetically

Still could use some insight, though: https://www.experts-exchange.com/questions/29140043/Where-would-I-look-for-these-elements-so-I-can-match-the-original-WP-site.html#questionAdd

Bruce GustPHP DeveloperAuthor Commented:
You rock!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.