This guide walks you through cloning a WordPress site within an agency hosting environment—like WP Engine, Kinsta, or Flywheel—where you have a dashboard but not always direct server access. You’ll end up with a working copy on a staging URL or a subdomain, without touching the live site. You’ll need your hosting control panel login and, ideally, an SFTP client or file manager access.
What You’ll Need
- Agency hosting account with staging or site-clone feature (WP Engine, Kinsta, Flywheel, etc.)
- Admin access to the WordPress dashboard of the live site
- SFTP client (like FileZilla) or hosting file manager
- phpMyAdmin or hosting database access (if manual clone is needed)
- A text editor to modify wp-config.php
Step-by-Step
Option A: Use the Hosting Dashboard’s Staging Feature (Recommended)
- Log in to your hosting dashboard. Navigate to the site you want to clone. Look for a button labeled “Staging,” “Clone,” or “Create Staging Environment.”
- Click the staging/clone button. The dashboard will ask for a name or subdomain for the clone (e.g., “staging” or “test”). Choose something clear like “clientname-staging”.
- Wait for the clone to complete. This can take a few minutes. The dashboard will show progress.
- Access the staging site. Once done, you’ll get a URL like
staging.clientname.comor a temporary URL. Click to open it. - Check the staging site. Verify it loads and looks like the live site. The database is copied automatically, so content should be identical.
- Work on the clone. Make your changes, test plugins, or develop new features. The live site is untouched.
- Push to live (if desired). When ready, use the dashboard’s “Push to Live” or “Deploy” button. Be careful—this overwrites the live site with your staging version.
Option B: Manual Clone via SFTP and phpMyAdmin (When No Staging Feature)
- Back up the live site. Use a plugin like UpdraftPlus or your hosting backup tool. Download a full backup of files and database.
- Create a new subdomain or directory. In your hosting control panel, create a subdomain like
clone.example.comor a subdirectory/clone. This will be the clone’s home. - Upload the files. Using SFTP, connect to your server and upload all WordPress files from the backup to the new directory. If you’re cloning a live site directly, download all files from the public_html (or equivalent) and upload them to the new location.
- Create a new database. In phpMyAdmin or your hosting database manager, create a new database (e.g.,
wp_clone) and a user with all privileges. - Import the database. In phpMyAdmin, select the new database, click “Import,” and upload the SQL file from your backup. If you’re cloning directly, export the live database first.
- Edit wp-config.php. Open the wp-config.php file in the new directory. Change the DB_NAME, DB_USER, and DB_PASSWORD to match the new database.
- Update the site URL. In the database, run SQL queries to replace the live URL with the clone URL. Use phpMyAdmin’s SQL tab:
UPDATE wp_options SET option_value = 'http://clone.example.com' WHERE option_name = 'siteurl'; UPDATE wp_options SET option_value = 'http://clone.example.com' WHERE option_name = 'home';
Replace
wp_with your table prefix if different. - Test the clone. Visit the clone URL. You may need to log in with the same credentials as the live site. If you see errors, check file permissions and .htaccess.
Common Mistakes
- Forgetting to update the database URLs. If you skip step 7 in the manual method, the clone will redirect to the live site or show broken assets.
- Not changing the database credentials in wp-config.php. This causes a “Error establishing a database connection” message.
- Using the same database as the live site. That would overwrite live data. Always create a separate database.
- Pushing to live accidentally. In staging dashboards, double-check the direction of the push. Some hosts have a “Push to Live” button right next to “Pull from Live.”
- Ignoring file permissions. Incorrect permissions (e.g., 777) can cause security issues. Use 755 for directories and 644 for files.
Tips
- Use a staging plugin if your host lacks the feature. Plugins like WP Staging can create a clone from within WordPress, but they can be resource-heavy.
- Keep the clone on a subdomain, not a subdirectory. Subdomains are easier to manage and less likely to conflict with the live site’s .htaccess rules.
- Hide the clone from search engines. In WordPress Settings > Reading, check “Discourage search engines from indexing this site.” Also, add a password protection via hosting (e.g., .htaccess) if needed.
- Test everything before pushing to live. Check forms, page speed, and plugin conflicts. Use a backup of the live site before deploying.
- Document the clone URL and credentials. Share them with your team or client only if necessary, and remove access when done.
Troubleshooting
- “Error establishing a database connection” – Check wp-config.php for correct DB name, user, password, and host. Ensure the database exists and the user has privileges.
- Redirects to live site – This is usually a cached URL in the database. Run the SQL replacement again, and clear any caching plugins (like W3 Total Cache) by deleting cache files.
- Broken images or links – The database still contains absolute URLs. Use a search-replace tool like WP-CLI or Better Search Replace plugin to update all occurrences of the live URL.
- Login loop or access denied – Clear cookies and try a different browser. If that fails, reset your password via phpMyAdmin by updating the user_pass field with an MD5 hash.
- Staging site is slow or times out – This may be due to resource limits. Disable heavy plugins or increase PHP memory in wp-config.php (
define('WP_MEMORY_LIMIT', '256M');). - Push to live fails – Some hosts require that the staging site be up-to-date with the live site first. Pull the latest changes to staging, then push again. If the issue persists, contact support.
Frequently Asked Questions
Will cloning my site affect the live version?
No, if you use the hosting dashboard’s staging feature, the live site is completely untouched. Manual cloning also doesn’t affect the live site as long as you don’t overwrite the original files or database.
Can I clone a site to a different hosting provider?
Yes, but it’s more involved. You’ll need to export the database and files, then import them to the new host. Update the DNS and URLs after migration.
How long does it take to clone a WordPress site?
With staging features, it usually takes 2-10 minutes depending on the site size. Manual cloning can take 30 minutes to an hour, mostly due to file transfer.
Do I need to update the database URLs if I use the staging feature?
No, the hosting dashboard handles URL rewriting automatically. You only need to do it manually.
Can I clone a site without a plugin or SFTP?
If your host has a one-click staging feature, yes. Otherwise, you need SFTP and database access. Some hosting panels offer a “Clone” button in cPanel, which also works.
What’s the best way to keep the clone in sync with live changes?
Use the “Pull from Live” feature in your staging dashboard to bring recent changes into the clone. For manual clones, you’d need to re-copy files and database, which is less efficient.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Microsoft Surface Duo: The Foldable Phone Story
- Samsung SM-T813 Hard Reset: Step-by-Step Guide
- Mafia Clash Codes: Real Meanings & Usage
- Remove Programs from Mac: Full Uninstall Guide
- Project Sentinel Morning Digest: Data Stack Failure Alerts
- Best KVM VPS Hosting: Top Picks & Guide