backup and restore wordpress site to new server

Backup and Restore WordPress Site to New Server – Complete Step-by-Step Guide

 

backup and restore wordpress site to new server

When you need to move your WordPress site from one server to another, the stakes are high: missteps mean downtime, broken links, lost data, or worse. With years of experience guiding migrations, I’ll walk you through a solid, airtight process for how to backup and restore your WordPress site to a new server without drama.

In this article you’ll learn how to prepare your site, execute a full backup, perform the transfer, configure the new server and verify everything works as expected on the new host in this article.

Why You Should Care About a Full Backup Before Migration

Before you click anything, understand this: your WordPress website consists of much more than posts and pages. It includes your database (which holds your content and settings), your files (themes, plugins, uploads, WordPress core), and server-specific settings (permissions, PHP version, configuration). If you only move parts and leave others behind, you’ll likely face problems.

Recent data shows that hosting migrations account for a significant portion of website errors — migration failure rates hover around 24% when full site components aren’t properly transferred. So you must treat this like a full project, not just a copy & paste job.

Step 1: Prepare Your Current Site for Backup

Start with housekeeping.

Make sure your current WordPress installation is up-to-date: update WordPress core, plugins and themes. That reduces the risk of compatibility issues when you restore on the new server.

Deactivate any caching plugins temporarily. These can interfere with database export or file operations.

Clean up unused themes, redundant plugins and large unused media files. Less clutter means a cleaner transfer and faster restore.

Check your current server environment: PHP version, MySQL version, memory limits, file permissions. The new server should meet or exceed these requirements.

Take note of your domain settings, SSL certificate, and custom configurations (such as cron jobs, redirect rules). These need replication or reconfiguration on the new server.

Step 2: Create a Full Backup of Your Site (Files + Database)

You must back up both files and database.

Database backup:

Use your hosting control panel (such as cPanel or phpMyAdmin) to export the entire database. In phpMyAdmin, select your WordPress database → Export → SQL format. Ensure “Add DROP TABLE” and “Add LOCK TABLES” are included for a clean import.

Files backup:

Via FTP or File Manager, download the entire WordPress root directory (typically public_html or www). This includes wp-content folder (themes, plugins, uploads) plus wp-config.php, .htaccess, and core files.

Store backups in at least two locations: your local machine and remote cloud storage (Dropbox, Google Drive or Amazon S3). Having off-site backup protects you if your hosting fails.

Step 3: Set Up the New Server Environment

On the new server you must replicate or improve the environment.

Install a fresh WordPress where needed (or prepare a clean directory). Create a new MySQL database, user and grant privileges. Note the database name, username, password and host.

Configure PHP version, memory limits, upload size and other server settings to match or exceed the old host. Confirm the new server meets WordPress’s requirements and is compatible with your theme/plugins.

Configure your domain’s DNS: either point your domain to the new server’s IP or use a temporary domain/subdomain for testing.

Step 4: Restore Files and Database on the New Server

File restoration:
Upload the downloaded files into the new server’s root directory, replacing or merging with the fresh WordPress install as appropriate. Ensure file permissions are correct (folders 755, files 644) and WP config and .htaccess are intact.

Database restoration:
In phpMyAdmin (or equivalent), select the new database → Import → Choose the SQL file you exported. Run the import. Then open wp-config.php and update DB_NAME, DB_USER, DB_PASSWORD and DB_HOST with the new server values.

If your domain changed or path changed, perform a search-replace in the database: for example use a SQL query UPDATE wp_posts SET post_content = REPLACE(post_content,’old-domain.com’,’new-domain.com’); to update URLs.

Step 5: Update Links, Permalinks and Domain References

Once your site is restored, you must check all internal references.

Log into your WordPress dashboard → Settings → Permalinks → click “Save Changes” to rebuild rewrite rules and flush caches.

Update the site URL and home URL in WordPress (Settings → General) or directly in the database via wp_options table (siteurl and home fields). If your domain changed, both should reflect the new domain.

Check and update links in posts, pages and widgets that might have absolute URLs pointing to the old domain. A plugin like “Better Search Replace” (run with care) can help.

Check image references. If media files were stored in wp-content/uploads, verify each link resolves correctly.

Step 6: Test Thoroughly Before Going Live

Before flipping DNS (if you haven’t already), test your migrated site:

Open the temporary URL or IP address on the new server. Verify front-end functionality: pages load, posts display correctly, uploads appear, and contact forms work.

Check admin area: login, navigate to plugins/themes, update settings, check backup plugins.

Check plugin functionality—especially caching, SEO, e-commerce, membership, or custom plugins. Some may need reactivation or license renewal.

Use browser dev tools to check for broken links, missing images, or console errors.

Check server logs for errors (500, 404). Verify SSL certificate is correctly installed and HTTPS is functioning.

When all tests look good, update your domain’s DNS to point to the new server. Allow propagation (typically 24-48 hours). It’s wise to keep both servers active during this period.

Step 7: Clean Up and Post-Migration Checklist

Once the new site is live:

Remove or deactivate backup/migration plugins if used just for transfer. They can be security risk if remaining in production unnecessarily.

Update DNS TTL back to normal if you temporarily lower it for migration.

Ensure your backups continue regularly on the new server. Set up an automated backup schedule (daily or weekly depending on update frequency).

Secure your site: update WordPress core, theme, plugins. Confirm file permissions, disable file editing in wp-config (define(‘DISALLOW_FILE_EDIT’, true);).

Monitor site performance and traffic. Use Google Search Console to monitor indexing issues or crawl errors.

Notify users or stakeholders that migration is complete. If your site had downtime, apologize and highlight improvements.

Common Migration Mistakes to Avoid

Don’t skip the database export: moving files alone leaves everything behind.

Failing to update wp-config.php or using incorrect database credentials causes immediate errors (“Error establishing a database connection”).

Neglecting to update permalinks or siteurl/home values leads to broken links or redirect loops.

Using old server versions of PHP/MySQL on new host can lead to plugin/theme incompatibility.

Neglecting to test thoroughly before switching DNS can result in end-user facing broken site.

Overwriting the site during propagation may cause data loss if visitors generated new content during cut-over. Plan for minimal downtime.

Why a Plugin-Based Migration Might Still Make Sense

While manual migrations give you full control and understanding, using a reliable plugin reduces complexity and risk of human error. Plugins like “All-In-One WP Migration” allow export of the entire site and import into a fresh WordPress install with drag-and-drop simplicity. For most smaller sites this route offers speed and convenience.

Plugins abstract many of the manual steps (database export/import, file transfer, search-replace). However you still need to ensure backups and tests happen before going live.

Conclusion

Migrating your WordPress site to a new server doesn’t have to be stressful. With a clear plan — backup files & database, set up the new server, restore everything, verify links/permalinks, and test before going live — you’ll navigate the move with confidence.

Your backups are your insurance policy: always store off-site and test restore periodically. After migration, revisit your backup schedule, tighten security, and monitor performance.

With proper care, your site can move seamlessly to the new server, with little to no noticeable downtime for your visitors. Having done this many times, you’ll find that the key to success is preparation, precision, and testing.

 

Post a Comment

Build Your Portfolio with Portlu – HTML5 Template from $17

Showcase your skills, projects, and agency with Portlu—a modern, customizable HTML5 template designed for creative professionals.