Migrating A WordPress Site: Step-By-Step Guide For Moving Servers

Backing Up Your Current Site

Before beginning the WordPress migration process, it is crucial to create a complete backup of your existing WordPress site’s files and database. This provides a restore point in case anything goes wrong during the migration. Some popular plugins to use for backing up your WordPress site include:

  • UpdraftPlus – Allows you to backup your entire site, including files and the database, to the cloud or download the backup to your computer.
  • BackupBuddy – Similar to UpdraftPlus but also lets you schedule recurring backups.
  • phpMyAdmin – An open source database management tool that lets you easily backup the MySQL database for your WordPress site with just a few clicks.

Be sure to test that you are able to successfully restore your site from the backup before proceeding with the migration. This is an important safeguard in case any issues occur.

Key Steps to Back Up a WordPress Site

  1. Install and configure a backup plugin like UpdraftPlus or BackupBuddy.
  2. Run a manual backup to create a complete backup file containing wp-content (uploads & plugins) as well as the MySQL database.
  3. Download the backup file from the plugin and store it in a safe location off-server.
  4. Test restoring your site by importing the backed-up database and files into a staging environment.

Choosing Your New Host

Selecting a high quality web host to migrate your WordPress site to is crucial for performance and stability reasons. When evaluating new hosts, some key criteria to consider include:

  • Scalability – How easily can you scale up or add more resources as your site grows?
  • Speed – Fast page load speeds depend on a host with adequate computing resources and minimal overcrowding.
  • Uptime – Look for guarantees of at least 99.9% uptime from any decent WordPress host.
  • Support – The level of WordPress-specific technical support is important in case issues occur.

Hosts that specialize in optimized WordPress hosting usually provide the best experience over generic web hosts. In particular, managed WordPress hosts that handle all the server configuration for you provide an easy migration path.

Types of Hosting for WordPress Sites

When selecting a new host for your WordPress site, here are some popular hosting plan types to evaluate:

  • Shared Hosting – Multiple sites share the same server resources. Affordable but can lack performance.
  • VPS Hosting – Get guaranteed resources by splitting a dedicated server. Scalable performance.
  • Dedicated Hosting – A full server only hosts your one site for maximum performance and control.
  • Managed WordPress Hosting – Plans optimized specifically for WordPress with managed admins.

Installing WordPress on the New Server

With your new hosting account created, it’s time to install WordPress on your new host server, which involves three main steps:

  1. Upload the WordPress files
  2. Create new MySQL database and user
  3. Run the WordPress installation

Uploading the WordPress Files

To begin, download the latest version of WordPress from WordPress.org and upload the extracted WordPress files and folders to your new host server. Typically this is done via FTP into the root folder of your hosting account. Your host should provide instructions on accessing FTP.

Creating New MySQL Database

Before installing WordPress, you need to create an empty database for it to use along with a MySQL user account to access it. Many hosts provide easy database creation through cPanel or their admin console. Typically only a database name, user, and password are needed to create the database.

Running the WordPress Installer

With the files uploaded and new database created, visit your domain in a web browser which should now display the WordPress installer. Run through the install process to configure WordPress with your database details and create your admin user account. This provides a clean WordPress instance before migrating your old site.

Transferring Your Files and Database

Now comes the most crucial part – migrating your actual website data including the files, database, themes, plugins, and uploads to your newly installed WordPress site. There are two main approaches:

  1. Use a dedicated migration plugin like Duplicator or All-in-One WP Migration.
  2. Manually export the database from your old host and import into the new database using phpMyAdmin.

Using Dedicated Migration Plugins

Dedicated WordPress migration plugins like Duplicator and All-in-One WP Migration provide robust tools to copy installs from one site to another. The process involves:

  1. Installing the plugin on your current WordPress site
  2. Generating a full site package containing database and files
  3. Uploading and installing the site package to your new host

This automates much of the complex work syncing up the two sites. Some hosts even provide their own migration plugins tailored for transfers.

Manually Transferring the Database

Without a plugin, you can export your old WordPress database and import it into your new database using the open source phpMyAdmin tool. The key steps are:

  1. Export database from old host through phpMyAdmin
  2. Upload database .SQL file to the new host
  3. Create new database in phpMyAdmin on new host
  4. Import uploaded .SQL file with table data

You’ll then need to manually move over wp-content and any other WordPress files via FTP as well. More complex but avoids reliance on plugins.

Updating the Site URL

After migrating your database and files over, all internal WordPress references to your old site URL will still remain pointing to the old domain. This includes site address URLs stored in the WordPress database. We need to now replace all instances of the old site URL with your new domain or site address. There are two ways to handle this:

  1. Utilize a search/replace tool within phpMyAdmin.
  2. Use a script like Better Search Replace to automate search/replace tasks.

Search and Replace in phpMyAdmin

Most web hosts provide access to phpMyAdmin for database management tasks. After logging in to phpMyAdmin on your new host, select your migrated WordPress database.

Go to the Search tab, enter your old site URL in the Find field, enter your new site URL In the Replace with field and select the tables to scan. This will update all data in the tables with your new URL.

Using Automated Scripts

Search/replace plugins like Better Search Replace and Search & Replace DB provide an interface within your WordPress dashboard to update URLs across the entire database in a few clicks. Simply install the plugin, enter your old and new URL, select tables, and run the scan to automatically update all URLs site-wide.

Reconfiguring Settings and Plugins

With your WordPress core database and files now migrated, some final clean up steps remain involving:

  • Adjusting any hardcoded database or file path settings
  • Reconfiguring caches, security plugins, and more for the new host

Editing wp-config.php File Paths

It’s common for developers to hard code file paths and custom database connections directly within wp-config.php.

Editing this core file is required in order to update any outdated file paths from your old server or custom database credentials to connect with your new database.

Plugin Configuration

Many plugins store custom settings and options within WordPress for configuration. As a result you’ll need to review critical plugins on your migrated site and manually reconfigure them.

Below are some important ones to update:

  • Caching – Clear all caches and retest.
  • Security – Check firewall rules, malware scanning settings, and other security plugin configs.
  • Backups – Enable automated backups and notifications to keep new site safe.
  • Forms – Double check email settings and submissions for contact form plugins.

Testing and Securing the Site

After fully migrating to the new host, thoroughly test your WordPress site prior to launching live. It’s also important to complete any final hardening and cleanup steps to lock down security on your new host.

Completing Site Testing

It’s critical to extensively and manually validate all functionality of your site pages, posts, plugins, forms, and themes prior to completing the cutover. Below are some key testing steps:

  • Verify theme and design elements displayed properly.
  • Test all plugins are functioning (forms, galleries, sliders, etc).
  • Check that admin dashboard and settings pages work.
  • Validate site pages and posts are loading correctly.
  • Test site loading speed and resources utilization.

Address any issues discovered and re-test until site is functioning properly.

Improving Security

New servers also means new security risks if not properly locked down. Some tasks to complete include:

  • Enable SSL via free certificate from Let’s Encrypt to require HTTPS.
  • Harden server config with security plugins like Wordfence.
  • Disable file editing capabilities and unused themes/plugins.
  • Update all passwords ensuring they are strong and unique.
  • Validate permissions on folders are set properly.

Hardening the wp-admin, login pages, and fixing any known exploit modules is also critical.

Redirecting Traffic and Wrapping Up

The final phase of the migration involves pointing all traffic from search engines and users to your newly migrated WordPress site. Major tasks include:

  • 301 redirect all pages on old site to relevant new URLs.
  • Submit new XML sitemap to search engines.
  • Inform any linking sites about the change.
  • Decommission old WordPress site.

Implementing 301 Redirects

To seamlessly transfer traffic from the old site, set up permanent 301 redirects instructing search engines and visitors to access relevant pages on the new domain. There are a few ways to handle this including:

  • Using .htaccess rules on old host to redirect all pages.
  • Configuring redirect rules within cPanel on old host.
  • Installing a redirect plugin like Simple 301 Redirects.

Be sure all old major site pages redirect properly prior to decommissioning the old site entirely.

Submitting New Sitemaps

Sitemaps detail all the page URLs search engines can index on your site. After migration you’ll need to generate a new XML sitemap and submit it to search engines like Google and Bing via their webmaster tools consoles.

This helps inform search bots that content has permanently moved to the new domain and facilitates transferring SEO value to the new URLs.

In addition to crucial migration tasks, conceptualizing the attributes of the migration process and recognizing the needs of end user enables meeting key user experience thresholds in digital environments. Migrating WordPress platforms requires meticulous planning, redundant fail-safes, robust testing, and securing both current and future site integrity.

Leave a Reply

Your email address will not be published. Required fields are marked *