WP Site Clone: How to publish a DEV WordPress website

If you're not using a system like WordPress Toolkit for staging, you can still easily clone sites!


This assumes you're using DirectAdmin or similar, and have Reseller+ access.

[PROD] Current site (example): fibreopticcabling.com (Source)
[DEV] New website (example): focdev.agency.net.au (Target)

HERE BE DRAGONS - DO NOT PROCEED UNTIL YOU HAVE READ AND UNDERSTOOD THIS ENTIRE SUPPORT ARTICLE:

  • WARNING #1: Take a full SQL backup before performing ANY operations via phpMyAdmin - NO EXCEPTIONS!
  • WARNING #2: SQL modifications (via WP Plug-in & phpMyAdmin) can be dangerous. Uncomfortable? We can help.

Export the PROD website, then import it as a DEV site:

  1. [PROD] Login to the WordPress Admin GUI
    1. You'll need sufficient rights/role to add plugins
  2. [PROD] Install & open the Duplicator plugin
    1. Create an archive, to be complete including database
    2. Download the completed archive and installer.php file
    3. For security, deactivate & remove Duplicator [PROD]
  3. [DEV] Login to the Hosting Account
    1. We recommend DirectAdmin (DA)
  4. [DEV] Create a DB and Database User
    1. Grant the DB to the new DB User
    2. Note down the name & credentials
  5. [DEV] Open the File Manager, to public_html
    1. Upload the Duplicator archive files
  6. [DEV] Navigate to example.com/installer.php etc.
    1. Complete the restoration process
    2. This will need the DB information
    3. Also, ensure use of DEV domain!
  7. [DEV] Finalise the Restoration process
    1. Check wp-config.php for URLs
    2. Check WP General Configuration
    3. Media Storage, php.ini, etc, verify

Having problems with PROD domain redirects via DEV?

Login to your DEV WP-Admin and install the "Better Search Replace" plugin to finalise changes in the database:

Better Search Replace (WP): You'll need to run all the following queries, after dry runs come back looking OK.

  1. //www.fibreopticcabling.com [PROD] > //focdev.agency.net.au [DEV]
  2. //fibreopticcabling.com [PROD] > //focdev.agency.net.au [DEV]
  3. http://focdev.agency.net.au > https://focdev.agency.net.au
  4. fibreopticcabling.com [PROD] > focdev.agency.net.au [DEV]
  5. www.fibreopticcabling.com [PROD] > focdev.agency.net.au [DEV]

ORDER OF EXECUTION: Please complete them as numbered above!

  1. PLEASE NOTE: Search & Replace is dangerous - BE CAREFUL!
  2. BACKUPS: Always verify a backup before any SQL works
  3. UNINSTALL: Please DELETE 'BSR' PLUGIN afterwards

You should now be able to browse your PROD and DEV websites separately, and work on your new development site!


Questions? That's what we're here for!

Let our Tech Support team know so they can give you a hand.

  • 25 users found this helpful
Was this answer helpful?

Similar, and hopefully helpful

WP-CLI: Using the command line to update your WordPress install

If you're managing a range of sites, or even a single busy website, WP-CLI can save you valuable...

NGINX Caching: How to exclude a URL / slug from User Cache

If you have a custom login URL, eCommerce jobs/queries or unique requirements, you can exclude...

WP-CLI: search-replace your WordPress DB from command line

Especially if you don't use a formal dev-to-prod procedure, using wp-cli to search-replace your...