Don’t Panic and Restore Your WordPress Site to a New Server Like a Pro
When Moving Servers Goes Wrong: What Every WordPress Site Owner Needs to Know
WordPress backup and restore to new server is the process of copying your site’s files and database from one hosting environment and rebuilding it on another — and when done right, your site comes back exactly as it was.
Here’s the quick version of how it works:
- Back up your files — download everything in your
public_htmlfolder via FTP - Export your database — use phpMyAdmin to export a
.sqlfile - Set up the new server — create a new database and user with the right permissions
- Upload your files — transfer everything to the new server via FTP
- Import the database — use phpMyAdmin on the new server to import the
.sqlfile - Update wp-config.php — point it to the new database credentials
- Update URLs — run a search-replace if your domain is changing
- Test before going live — verify everything works before switching DNS
It sounds straightforward. But research shows that around 24% of WordPress migrations fail when site owners don’t transfer all components correctly. A missing database export, a wrong setting in wp-config.php, or skipping a URL update can take your site offline — sometimes at the worst possible moment.
If your business depends on your website for sales or customer contact, that kind of downtime isn’t just frustrating. It’s costly.
This guide walks you through every step, from creating a solid backup to testing your restored site on the new server — so you don’t have to guess or panic.
I’m Kevin Gallagher, founder of wpONcall, with over 15 years of web design experience and more than 2,500 WordPress sites built and managed. I’ve handled countless wordpress backup and restore to new server projects and I’m here to share exactly what works. Let’s get into it.
Must-know wordpress backup and restore to new server terms:
Understanding the Core Components: Files and Databases
To master the wordpress backup and restore to new server process, we first need to understand that a WordPress site isn’t just one single “thing.” It is a combination of two distinct parts that live in different places on your server.
First, you have your Site Files. These are the physical documents stored on the server’s hard drive. They include the WordPress core software, your themes, your plugins, and every image or PDF you’ve ever uploaded to the Media Library. Most of these live in the wp-content folder.
Second, you have the Database. WordPress uses a database system called MySQL or MariaDB. This is where the “brains” of your site live. Every post you’ve written, every comment left by a reader, your site settings, and your user profiles are stored as rows of data in this database.
When you perform a WordPress Backup and Restore, you aren’t just moving files; you are reconnecting these two halves on a brand-new machine. If you want to see this in action, check out this Backup & Restore Your WordPress Site: A STEP-BY-STEP Guide.
Why You Must Back Up Both Components
We often see site owners make the mistake of only backing up their files. They think, “I have my images and my theme, I’m good!” Unfortunately, without the database, you have a shell with no content. Conversely, if you only have the database, you have the text of your posts but no images or layout to display them.
Data synchronization is the biggest hurdle. If your files and database aren’t moved together, you face that dreaded 24% failure rate. Your theme settings, plugin configurations, and critical user data will simply vanish. This is why learning WordPress How to Backup both components simultaneously is vital for data loss prevention.
Server Environment Requirements
Before you initiate a wordpress backup and restore to new server, you must ensure the new home is ready for the guest. Think of it like moving a tropical plant to a new greenhouse; the temperature and humidity must match.
In technical terms, this means checking:
- PHP Versions: If your old site ran on PHP 7.4 and your new server is forced onto PHP 8.2, some of your older plugins might break.
- MySQL/MariaDB Compatibility: Ensure the database versions are similar to avoid import errors.
- Memory Limits and Execution Times: High-activity sites need enough “breathing room” in the server settings to run properly.
For more on technical prep, see this guide on How to Back Up & Restore a WordPress Site to a New Server – Jetpack.
Step-by-Step Guide to WordPress Backup and Restore to New Server
Migration doesn’t have to be a “cross your fingers and hope” event. By following a structured WordPress Migration Guide 2025, we can ensure a smooth transition.
Manual File Backup and Restore to New Server
The most reliable way to move files is via FTP (File Transfer Protocol) or SFTP (Secure FTP). We recommend using a free tool like FileZilla.
- Connect to your old server: Enter your host, username, and password.
- Locate the root directory: This is usually named
public_html,www, orhttpdocs. - Download everything: Select all files and folders and download them to a secure folder on your local computer.
- Maintain structure: Ensure you don’t move files out of their respective folders.
When you’re ready to restore, you’ll simply reverse this process on the new server. If you’re feeling nervous about this, we have a detailed walkthrough on how to Backup WordPress Manually.
Exporting and Importing the Database via phpMyAdmin
Most hosting providers provide a tool called phpMyAdmin. It’s the industry standard for managing your database.
To Export:
- Log into your old host’s control panel and open phpMyAdmin.
- Select your WordPress database from the left sidebar.
- Click the Export tab.
- Choose the “Quick” method and ensure the format is “SQL.”
- Click “Go” to download the
.sqlfile to your computer.
To Import:
- On the new server, create a fresh, empty database.
- Open phpMyAdmin on the new server and select that empty database.
- Click the Import tab.
- Choose the
.sqlfile you just exported and click “Go.”
For a deeper dive into these steps, consult our WordPress Backup Restore Guide.
Automated Tools for WordPress Backup and Restore to New Server
If the manual route feels like too much “tech speak,” you aren’t alone. Many site owners prefer using a WordPress Plugin to Migrate Site to New Hosting Service.
Plugins like UpdraftPlus (which has over 3 million active installs), All-in-One WP Migration, or Duplicator can bundle your files and database into a single package. You then install a fresh WordPress site on the new server, install the same plugin, and “upload” that package to restore everything in a few clicks. These are excellent for smaller sites or those without complex server configurations.
Configuring the New Server Environment
Once the files are uploaded and the database is imported, the two halves are on the same server, but they aren’t “talking” to each other yet. We need to bridge the gap.
| Setting | Old Server Value | New Server Value |
|---|---|---|
| Database Name | old_db_123 |
new_site_db |
| Database User | old_user |
new_site_admin |
| Database Password | ******** |
(New Secure Password) |
| Database Host | localhost |
localhost (usually) |
You must create a new MySQL user in your new hosting control panel (like cPanel or Plesk) and grant that user “All Privileges” to the new database. Without these privileges, WordPress won’t have permission to read or write data. After that, you’ll need to Upload WordPress Backup New Host details into the site’s configuration.
Editing the wp-config.php File
The wp-config.php file is the most important file in your WordPress installation. It tells WordPress exactly how to connect to the database.
Open the file (which you downloaded in the manual file step) using a text editor like Notepad or TextEdit. Look for these lines:
define( 'DB_NAME', 'database_name_here' );define( 'DB_USER', 'username_here' );define( 'DB_PASSWORD', 'password_here' );define( 'DB_HOST', 'localhost' );
Replace the “here” values with the credentials you just created on the new server. Save the file and upload it back to the root directory of your new server. For specific scenarios, like moving from a Manually Restore Your Site from a Jetpack Backup File on WordPress.com, you might have additional configuration steps.
Handling Large Sites and Upload Limits
If your site is massive—think 5GB of images or a 500MB database—you might run into “Upload Limit” errors. Standard web browsers often time out during large transfers.
To fix this, we recommend:
- Zip Compression: Compress your
wp-contentfolder into a.zipfile before uploading. - SSH/WP-CLI: If you’re tech-savvy, using the command line (SSH) is much faster and more stable for large imports.
- Chunked Uploads: Some plugins allow you to upload your backup in small “chunks” to bypass server limits.
Check out our Backup WordPress Content Complete Guide for more tips on managing high-volume data.
Finalizing the Migration and Updating URLs
If you are moving to a new server and a new domain name (e.g., moving from mysite.com to mynewbrand.com), there is one more critical step. WordPress stores your URL in dozens of places within the database. If you don’t update these, your site will try to load images and links from the old domain, resulting in a broken mess.
You need to update the siteurl and home rows in the wp_options table of your database. However, doing this manually is tedious. We recommend using a tool or plugin to Migrate Website to New Host that handles “serialized data” correctly. If you don’t, your widgets and theme settings might break during the search-and-replace process. For a zero-downtime approach, follow the How to Move WordPress to a New Host or Server (with No Downtime) methodology.
Updating Permalinks and Search-Replace
Even if your domain hasn’t changed, your “permalinks” (the structure of your URLs) might need a refresh.
- Log into your new WordPress dashboard.
- Go to Settings > Permalinks.
- Don’t change anything—just click Save Changes.
This simple act forces WordPress to rewrite your .htaccess file, which often fixes 404 errors on your subpages. If you still see broken images, a database search-replace is your best friend. We cover this in The Ultimate Guide to Restoring Your WordPress Website from Backup.
DNS Propagation and Testing
Now comes the “waiting game.” You need to point your domain to the new server by updating your Nameservers or A Records at your domain registrar.
This process, called DNS Propagation, can take anywhere from a few hours to 48 hours to reach everyone globally. While you wait, you can use the “hosts file trick” on your computer to preview the site on the new server before the rest of the world sees it. This ensures you can How to Restore WordPress Site Fast by Using Backups and verify everything is perfect before the official “flip of the switch.”
Troubleshooting Common Migration Errors and Post-Migration Security
Sometimes, despite our best efforts, things go sideways. The most common error is the “Error Establishing a Database Connection.” This almost always means there is a typo in your wp-config.php file or the database user doesn’t have the right permissions.
If you see a “White Screen of Death,” it’s often a plugin conflict caused by a different PHP version on the new server. You can usually fix this by renaming your plugins folder to plugins_old via FTP, which deactivates everything and lets you back into the dashboard. For more fixes, see how to Restore Website from Backup.
Minimizing Downtime and Ensuring Security
To keep downtime at zero, keep your old hosting account active for at least a week after the move. This ensures that while DNS is propagating, visitors are still seeing a live version of your site—either the old one or the new one.
Once the move is complete, security is your top priority.
- Update SSL Certificates: Ensure your new host has a valid SSL certificate active.
- Reset Passwords: It’s a good practice to change your admin passwords after a move.
- Enable 2FA: If you haven’t already, add Two-Factor Authentication.
For a comprehensive look at security during moves, visit WordPress Backup and Migration.
Post-Migration Checklist
Before you call it a day, run through this final list:
- [ ] Test all forms: Ensure your contact forms are actually sending emails.
- [ ] Check for broken links: Use a tool to scan for 404 errors.
- [ ] Verify backups: Ensure your new automated backup system is already running.
- [ ] Performance check: Is the new server actually faster? Use Google PageSpeed Insights.
Our Site Migration Service Complete Guide offers an even more exhaustive list for professional-grade transitions.
Frequently Asked Questions
How long does DNS propagation take after moving to a new server?
DNS changes typically take 24 to 48 hours to fully propagate across the internet. However, in many cases, you’ll start seeing the new site within an hour or two. Factors like your TTL (Time to Live) settings can influence this. It’s best to wait at least a full day before cancelling your old hosting. For a deep dive into this, check out this guide on backup and restore wordpress site to new server.
Should I use a plugin or manual method for migration?
If your site is under 1GB and you aren’t comfortable with FTP or databases, a plugin is the way to go. It’s faster and reduces human error. However, if you have a massive site or specialized server requirements, the manual method gives you much more control and is less likely to time out. If you’re unsure, our WordPress Site Migration Service can handle the heavy lifting for you.
What happens if I get a “Database Connection Error” after restoring?
This is almost always a credential issue. Double-check your wp-config.php file for typos in the DB_NAME, DB_USER, or DB_PASSWORD. Also, ensure your DB_HOST is correct; while “localhost” works for 99% of hosts, some providers require a specific IP address or URL. If you’re stuck, we can help you Migrate WordPress without the headaches.
Conclusion
A wordpress backup and restore to new server doesn’t have to be a source of anxiety. By treating the process as a logical series of steps—backing up, preparing the new environment, and carefully reconnecting the files and database—you can move your digital home with confidence.
At wpOncall, we understand that your website is the heartbeat of your business. Based right here in Santa Rosa, CA, we specialize in taking the “tech stress” off your plate. Whether you need a one-time migration or ongoing protection, we offer daily updates, geographically separate cloud backups, and lightning-fast support to keep your site secure and performing at its best.
Don’t leave your site’s safety to chance. If you’d rather spend your time growing your business than wrestling with FTP settings, we’re here to help. More info about WordPress support services is just a click away. Let’s make your next migration your smoothest one yet!