You’ve decided to make the plunge and move your WordPress site to a new hosting company. At first, the transition seemed to go fairly smoothly. After all, you used the WHSR’s Switching Web Hosts guide. However, now your images aren’t showing or your pages are out of whack. Maybe you can’t pull up your databases at all.
Few things are as stressful as planning to seamlessly move your website to a new host only to find out that things aren’t going as planned and your site isn’t running efficiently. In fact, it is the reason many website owners decide to stay with a host they have either outgrown or who is not giving them the service they deserve. Avoiding migrating to a new server is no reason to put up with poor service, though, because there are some simple things you can do to easily solve some of the more common issues you’ll run into with switching hosts.
WordPress sites can be a challenge to move to a new service. WordPress offers detailed instructions on how to move a website to a new host. You can follow their guide step-by-step and at the end of the day you will stay run into a few problems that need to be tweaked. This is frightening for website owners who don’t completely understand PHP coding or who may not be sure how to fix a database if it gets corrupted.
Need Help Fixing Your WordPress Site?
WHSR is now partner with Codeable.io to assist users who need professional WP development / customization services.
To get a free quotation, please fill up this request form.
Simple Workarounds for Broken Images
One of the most common issues with WordPress moves is images not linking up correctly or not appearing in your media library. This can make it impossible to paste images already uploaded to your site into future articles. In addition, current articles and featured images may occur as a broken image.
Upload Images and Upload Database
The first thing to try that usually works requires a couple of steps.
- Login to the new host with an FTP program. I like Filezilla, but you can use whatever you prefer and is easy for you to work with. Upload your “uploads” file from the old server from WP-Content/uploads to the same spot on the new server.
- Make sure all the images have uploaded. Sometimes your server will time out, etc. If some of your images are broken and others are not, this may be the reason. Reupload and make sure everything is copied over.
- Navigate to the Cpanel on your old server and download a copy of the database. Reupload to the new server. Sometimes, simply uploading the database fixes the issue with the old photos not showing.
If the steps above do not work, install one of the search and replace plugins. Just about any of them will work, but most are rated between one to five stars with five being the highest. This tells you what others thought about a particular plugin. Once that plugin is installed and you are certain all images have been uploaded, run the program and it will search and replace any broken images.
Finally, take the time to click through each page. Even though the above steps may have solved your problem, it is possible one or two images were missed and need to be uploaded again. If you only have one or two broken images, it may even be easier to go ahead and manually upload those to each post instead of going through all the steps again.
You’ve migrated your site and everything seems to be running well when suddenly you get that dreaded error stating that your database is corrupted. Unless you have a large amount of programming knowledge under your belt, you may even have a moment of panic or two when this happens.
If you can access your WordPress dashboard, try to first disable all plugins and see if your database pulls up correctly. Then, re-enable them one at a time, checking the home page each time to make sure it is showing correctly.
If you cannot access your dashboard because you get the corruption error, it is a little trickier to fix this issue. Try these different simple steps to see if one works:
- Reupload your database, writing over the new database.
- Check where the corruption error is coming from and try to reupload that file from your old site to your new one.
- Open the file and check to make sure it is pointing to your new server.
If those steps do not work, you may have to do a bit of coding, but I’m going to talk you through it. First, open the new site in FTP and go to your wp-config.php file. The file should be in the main folder where you blog resides.
The first thing you should always do whenever editing your PHP files is to make a copy of what is there. You can copy and paste into Notepad and save on your desktop. This could save you if your files get really corrupted.
Look for this wording:
/** Absolute path to the WordPress directory. */
Just above that line, add this wording:
Save your changes and leave your FTP program open for now. Open up your favorite web browser. Go to this address:
I always use “Repair and Optimize” but either button will work to repair your database for you. When the process is completed, you will see a screen that looks the one below. It will even remind you to remove that repair line from your configuration file.
If the above methods don’t work, your next step is to head over to your database. This can be daunting if you aren’t sure exactly how databases work, but the steps are fairly simple. Even if you completely destroy the database, you should be able to just redownload from the old server and upload again. There really is no need to be afraid as long as you have your database backed up.
- Login to your control panel and click on PHPMyAdmin
2. Choose your WordPress database. This typically is titled yoursite_wrdp1. However, this can vary. You will likely see “WP” somewhere in the title, though. I have posted a sample below, but I erased my own info so my database isn’t out there for anyone to see and typed in “yoursite” to give you an idea of where to find your database. You can also find your database name listed in that wp-config.php file that you had open in the step above. Click on the database name in PHPMyAdmin to open it.
3. Once the database loads, check the button that says “ / Check tables having overhead“.
4. Choose “Repair Table in the drop down box to the right of where you just checked the box.
5. You’ll be given a status about whether the tables were repaired and the top of your screen should say “your SQL query has been executed successfully”.
What If Nothing Works?
If you’ve tried the steps above to repair broken images or a database and your site still isn’t working, your only option is to start over. Uninstall WordPress completely and reinstall a fresh copy. Upload your WP-Content folder again, etc.
If that doesn’t fix your issues, contact the tech support experts at your new host. Although they are not obligated to help you with a WordPress issue, they may have additional suggestions or step in and figure out what is going on. My web hosting company has helped me a couple of times and been very insightful about what to do in the future when such situations arise. This is where a web host with excellent customer service pays off.
Running into issues with moving to a new server can be frustrating. Patience, a good sense of humor and taking the time to work through each step can often help you solve minor issues.