How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

WordPress migrationcPanel WHM transfermacOS to cPanel

~3 min read • Updated Feb 24, 2026

1. Overview


This tutorial explains how to migrate a WordPress® installation from a macOS® server to a cPanel & WHM server. This process is useful when you develop your website locally and want to deploy it to a public-facing server.


Warning:

  • Your website may experience downtime during the migration.
  • Because WordPress is not developed by WebPros International, LLC, cPanel Support cannot assist with the migration.

Note: Apple discontinued support for website hosting on macOS Server in 2018.




2. Migrate Your WordPress Installation


2.1 Pre‑Migration Requirements


Before you begin, ensure you have:

  • A domain hosted on a cPanel & WHM server.
  • An FTP client and valid FTP credentials.



3. Export the WordPress Database


Use phpMyAdmin on your macOS server:

  1. Navigate to localexample.com/phpmyadmin.
  2. Click Export.
  3. Select an export method:
    • Quick (recommended)
    • Custom
  4. Ensure the format is SQL.
  5. Click Go to download the database file.



4. Upload WordPress Files to the New Server


Connect to your hosting account via FTP and upload all WordPress files to:

public_html/




5. Create a MySQL Database in cPanel


Create a new database using one of the following interfaces:

  • Version 118 and earlier: cPanel » Databases » MySQL® Databases
  • Version 120 and later: cPanel » Databases » Manage My Databases



6. Import the WordPress Database into cPanel


  1. Open cPanel » Databases » phpMyAdmin.
  2. Select the database you created.
  3. Click Import.
  4. Click Choose File and select your SQL backup.
  5. Click Go to import the database.



7. Update the Website URL in the Database


In phpMyAdmin:

  1. Open the wp_options table.
  2. Edit the siteurl entry and replace it with your new domain.
  3. Edit the home entry and update it as well.



8. Configure WordPress Database Settings


Update wp-config.php to match your new database credentials:

  1. Open cPanel » Files » File Manager.
  2. Navigate to public_html.
  3. Edit the wp-config.php file.
  4. Update the following lines:
define( 'DB_NAME', 'your_db_name' );
define( 'DB_USER', 'your_db_user' );
define( 'DB_PASSWORD', 'your_db_password' );
define( 'DB_HOST', 'localhost' );

Click Save Changes.




9. Update Links and Images


To fix broken URLs:

  1. Open phpMyAdmin.
  2. Select your database.
  3. Click SQL.
  4. Run a query such as:
UPDATE wp_posts 
SET post_content = REPLACE(post_content, 'localexample.com/', 'www.newdomain.com/');



10. Save Changes in the WordPress Dashboard


  1. Log in to WordPress.
  2. Go to Settings » General and click Save.
  3. Go to Settings » Permalinks and click Save again.



11. Delete the macOS Website


After confirming your site works correctly on the cPanel server, delete the old installation from your macOS server.




Conclusion


By exporting your database, uploading your WordPress files, configuring your database settings, and updating URLs, you can successfully migrate a WordPress installation from macOS to a cPanel & WHM server. This ensures your site is fully functional and ready for public access.


Written & researched by Dr. Shahin Siami