How to move a WordPress staging site to live using cPanel

Previously, I posted a tutorial explaining how to create a WordPress staging site with cPanel. This is the follow-up tutorial that explains how to move a WordPress staging site to live using cPanel. Once all changes to the staging site are complete, you are ready for the migration process.

Part 1: Backup staging and live site

  1. Access cPanel > File Manager > [staging site folder].
User interface menu indicating where the compress button is.
  • Highlight everything inside the folder > Right-click on any of the folders and click Compress.

Compress means to package files and folders into a single archive file.

  • A prompt box will appear. Give the compressed archive a name that is easy to reference. For this tutorial, the backup archive is named ‘staging-site-backup.zip’. If you are unsure which compression to choose, use ‘zip’.
'Compress' panel containing instructions for this tutorial.
  • Right click on the compressed archive file > Download (so you have a copy on your computer’s local drive).
  • Repeat the same process for the live site folder (typically in the ‘public_html’ folder).

Part 2: Backup staging and live site database

  1. Access cPanel > phpMyAdmin.
  2. On the left navigation bar, navigate to the staging site database.
  3. In the main panel, click Export.
phpMyAdmin interface indicating where to find your database and the export button.
  • Choose Quick export method > SQL format > Go (this will download the database onto your computer’s local drive.
phpMyAdmin interface showing where the Go button is in the Export panel.
  • Repeat the same process for the live site database.

Part 3: The migration process

  1. Access cPanel > File Manager > navigate to public_html folder.
  2. Create a folder called ‘old’. Highlight everything in public_html folder (except for old folder), then move to old folder.
  3. Navigate to the staging site folder, then move all files and folders to public_html folder.
  4. Go back to cPanel Home > phpMyAdmin
  5. Navigate to the staging site database > go to the ‘Options’ table and update the option values of ‘siteurl’ and ‘home’ to the correct URL. For example, from dev.alexthedigitalproducer.com to alexthedigitalproducer.com
  6. Open a new page on your web browser and type in your domain name and access WordPress backend (e.g. [domain name/wp-admin]) > Update Permalinks.
  7. Check the entire website for broken links. If you have too many links to check, there are plugins available for your convenience.

Part 4: Clean up (optional)

If the website is operating as it should go to cPanel to clean up redundant files:

  1. Delete the previous version of the website in File Manager.
  2. Delete redundant database.
  3. Delete subdomain.

Tutorial complete

That’s the end of the tutorial. If you found this useful, please leave a comment and share this blog. As always, let us know if you have any specific topics that you would like us to cover in the future. Keep up to date with all our latest blog posts here.

Happy migrating!

Comments

  1. Chyrl Graham

    I had a very hard time trying to find an online tutorial on how to move a staging website to the live website. most of the online information required you to use a paid plugin. I found your tutorial and followed it to the letter. Everything worked perfectly. I appreciate your due diligence in presenting accurate instructions. Thank you…Cg

Send your comment