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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue

How to Securely Copy an Account Between Servers Using SSH Keys in cPanel & WHM

This article explains how to securely transfer a cPanel account from a source server to a destination server using SSH key authentication. It covers key generation, authorization, importing public keys, and performing the transfer through WHM’s Transfer Tool.

Continue