DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
VGSOURCES
Get listed

domain changePATCH 2026.10.15

How to Clone a WordPress Site Without Broken Domain Links

By VGSources Team 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable way to clone WordPress to staging or a new domain is to move both the complete file tree and the database, keep the destination private, update the destination URL settings, run a serialization-aware database search-and-replace, flush rewrites and caches, and test the clone before changing DNS. Copying only posts, only uploads, or only the database leaves references and configuration behind, which is why images, theme settings, forms, and internal links often fail after a move.

What a complete WordPress clone contains

A clone is a second, working WordPress installation—not an export of visible articles. The source directory and database must be transferred together so that attachment records, plugin settings, menus, widgets, users, and theme options still correspond.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Part What to copy Why it matters after the move
WordPress files The core installation and configuration files, including wp-config.php where appropriate Core code and environment settings determine how WordPress connects to the destination database.
wp-content The active theme, plugins, mu-plugins, languages, and uploads Theme templates, plugin code, and media files are not recreated by importing posts.
Database All WordPress tables, including options, posts, post metadata, users, taxonomy data, and plugin tables Database rows contain URLs, serialized theme settings, attachment paths, menus, forms, and other site state.
External configuration Web-server rules, PHP settings, cron jobs, DNS, CDN rules, email delivery, analytics, and webhook endpoints These items can continue pointing to the old host even when WordPress itself loads correctly.

When a domain or directory changes, the old address can remain in many database fields. A browser may therefore request an image from the old host, a stylesheet may load over the wrong protocol, or a plugin may post a form to a retired endpoint. The WordPress Developer Handbook warns that changing a domain or URL introduces concerns beyond copying files.

Plan the migration and freeze the source

Choose a maintenance window if the clone will become production. A busy site can receive orders, comments, uploads, or form submissions while you copy it; those changes will not exist in an earlier database export. For a staging copy that will never replace production, you can copy while the site remains live, but record the time of the export so you know how current the clone is.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses | Anti UV Ray, For Computers & Gaming, Square Frame, Eyewear for Men and Women
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Record the source state

  • Note the WordPress version, PHP version, active theme, active plugins, multisite status, database name, table prefix, and current home and site URLs.
  • List scheduled tasks, payment or email callbacks, analytics endpoints, CDN settings, and any web-server redirects that live outside WordPress.
  • Confirm that you can log in as an administrator and that you have database and file-level access for rollback.

Keep the old site untouched until the new copy has passed testing. A rollback is simplest when the source directory and pre-migration database remain available.

Back up both files and database

WordPress migration guidance calls for a backup of the WordPress directory, images, plugins, other files, and database before a move. Export the database from the source WordPress directory with WP-CLI:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp db export backup.sql

Store that SQL file outside the web root and make a separate copy of the complete site files. Check that the archive can be read and that the SQL export is not empty. Do not treat a host snapshot as your only backup unless you have verified that it can be restored independently.

Build an isolated destination

Create the destination hosting account, database, database user, PHP runtime, and document root before importing anything. Match the source PHP and WordPress versions first; upgrade after the clone is working, not during the move.

Keep staging private

Protect a staging clone with HTTP authentication, a host-level access list, a VPN, or an equivalent control. A password gate is stronger than relying on a WordPress login page because crawlers and unauthenticated requests can still reach public assets without it. Discourage indexing while you test, and do not remove that restriction until the final domain is live.

Copy files and import the database

Copy the source files into the destination document root, preserving permissions and the complete wp-content directory. Create an empty destination database, then import the export from the destination WordPress directory:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
wp db import backup.sql

Update the destination configuration with the new database credentials, database host, table prefix, and salts as required by the host. If the destination uses a different directory layout, verify that the web server points to the directory containing wp-admin, wp-includes, and wp-content.

Set the destination URL values

WordPress uses the home and siteurl options to determine where the front end and administrative installation load. If the domain or path changes, set both values on the destination before testing. From the destination WordPress directory, the corresponding WP-CLI commands are:

wp option update home 'https://new.example'
wp option update siteurl 'https://new.example'

Include a subdirectory in both values when the clone lives at one, such as https://new.example/staging. Use the exact protocol and hostname that the destination serves. A mismatch between HTTP and HTTPS can create redirects or mixed-content warnings before the database replacement has even run.

Changing these two options is necessary but not sufficient. Content, attachment metadata, widget settings, serialized theme options, plugin configuration, and custom fields can still contain the old address. Those references require a database-wide replacement on the copied database.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replace every old URL without corrupting serialized data

Use WP-CLI’s search-replace from the destination WordPress directory. It understands PHP serialized data, so string lengths inside serialized arrays are recalculated instead of left with invalid byte counts.

Preview first

Run a dry run against the old and new base URLs:

wp search-replace 'https://old.example' 'https://new.example' --all-tables --dry-run

Read the report before changing anything. Confirm that the old URL is the intended source, that the replacement count is plausible, and that the command is looking at the destination database rather than the live site. A dry run changes nothing.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men | Office Gifts for Women, iPhone Stand, Gadgets for Men, Office Decor, Gaming Desk Accessories for Samsung Fold 8, Switch, iPad
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Run the replacement

When the preview is correct, run the same command without --dry-run:

wp search-replace 'https://old.example' 'https://new.example' --all-tables

The --all-tables option includes tables outside the standard WordPress set, which is important for plugins that keep settings in their own tables. If a plugin stores data in a table you deliberately do not want changed, target tables explicitly or use the documented skip-table controls rather than guessing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Preserve GUIDs unless you have a specific reason

Post GUIDs are identifiers, not display URLs. WP-CLI examples show --skip-columns=guid for migrations where GUIDs should remain stable:

wp search-replace 'https://old.example' 'https://new.example' --all-tables --skip-columns=guid

Use that choice deliberately. If a particular integration requires GUID changes, document the reason and test feeds and syndication afterward.

Handle multisite deliberately

In multisite, each site has its own URL-related rows and the network has additional domain and path data. Target the specific site URL when cloning one site, and use WP-CLI’s documented network mode only when the entire network is meant to move. A network-wide replacement on a single-site clone can change URLs that belong to other sites.

Why plain SQL editing is risky

A global find-and-replace in a text editor or basic SQL command can change the visible URL while leaving serialized length fields unchanged. The result may be broken widgets, missing theme options, fatal errors, or plugins that silently revert settings. Use WP-CLI or another tool that explicitly supports PHP serialization; never assume that a successful SQL command means the data is valid.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Refresh rewrites, object caches, and generated files

After replacing URLs, refresh WordPress’s rewrite rules and clear caches on the destination:

wp rewrite flush
wp cache flush

Visit Settings → Permalinks and save once if you need a manual confirmation that rewrite rules were regenerated, but do not change the permalink structure during a migration. Also purge any page cache, CDN cache, reverse-proxy cache, PHP opcode cache, or plugin cache that may still contain the old hostname. If the destination uses generated CSS or JavaScript files, regenerate them using that system’s normal control panel or command.

Validate the private clone before changing DNS

Test through the private staging address or a temporary hosts-file mapping. Do not wait for visitors to discover migration errors after the domain points to the new server.

Core page and asset checks

  • Open the home page, several recent and older posts, pages, category archives, tag archives, author archives, and paginated views.
  • Open representative images, galleries, downloadable files, and video embeds. Confirm that attachment URLs use the destination host and that files return the expected status.
  • Inspect page source and browser developer tools for old-host references, HTTP assets on an HTTPS page, missing CSS, JavaScript errors, and requests returning 404 or 403.
  • Check menus, widgets, theme customizer values, logos, favicons, background images, and any block patterns that use absolute URLs.

Interactive and account checks

  • Submit every important form, including contact, newsletter, search, comments, checkout, and account-registration forms. Verify delivery and the destination of each callback.
  • Log in, log out, reset a password, and test an administrator screen. Confirm that cookies are scoped to the destination domain and that no login redirect returns to the old host.
  • Run scheduled tasks in a safe manner and verify that cron jobs, queue workers, and transactional email are not sending duplicate production messages.

Search, indexing, and redirects

  • Check canonical tags, Open Graph URLs, XML sitemaps, feeds, pagination links, and robots behavior.
  • Keep the staging clone non-indexable and access-controlled. A duplicate site can be crawled before launch even when its pages look correct.
  • Test redirects from old paths only where they are intentionally configured. A blanket redirect can hide a missing page or create a loop.
  • Crawl the clone and compare its 404 list with the source. Investigate every unexpected difference before cutover.

Non-WordPress dependencies

DNS records, CDN rules, web-server redirects, firewall allowlists, email forms, analytics properties, payment callbacks, OAuth applications, webhooks, and external cron services are separate from the WordPress database. Update each one that should use the new host, and decide which must continue to point to production while staging is private.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cut over the domain safely

  1. Lower DNS TTL ahead of time when practical. A shorter TTL can make a planned change propagate faster, but cached DNS responses can still remain until their prior TTL expires.
  2. Freeze final writes. Put the source in maintenance mode or otherwise stop comments, orders, uploads, and other writes that would be lost in the final export.
  3. Export and import the final database delta. Repeat the backup and import process so the destination includes the last approved changes, then repeat the URL replacement if the final import restored old values.
  4. Run the validation checklist again. Test the destination while it is still private, including forms, login, media, redirects, canonical tags, and sitemaps.
  5. Point DNS to the validated destination. Keep the old site available but protected from new writes until traffic confirms the cutover.
  6. Re-crawl after propagation. Check server logs, error rates, 404s, form deliveries, and cache behavior from real hostnames and networks.

Retain the pre-migration files and database until logs show normal traffic and all important workflows have succeeded. Do not delete the old installation immediately after DNS changes; it is the fastest rollback option if an overlooked dependency fails.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failures and precise fixes

Only siteurl was changed

Symptom: The dashboard opens at the new address, but content links, images, widgets, or plugin settings still use the old host. Fix: Set both home and siteurl, then run a dry-run and a full serialization-aware replacement across the destination database.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

A text-based SQL replacement damaged settings

Symptom: Theme customizer values disappear, widgets reset, or a plugin throws errors after the replacement. Fix: Restore the pre-replacement database backup and rerun the change with WP-CLI or another serialization-aware tool. Do not attempt to repair serialized length fields by hand unless you fully understand the stored structure.

Pages work, but pretty permalinks return 404

Symptom: The front page loads while posts and pages fail. Fix: Verify the document root and web-server rewrite configuration, then run wp rewrite flush. Confirm that the destination can write its rewrite rules or that equivalent server rules have been installed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The database is correct, but visitors see old content

Symptom: A private test shows the new URL, while public requests return old pages or old assets. Fix: Purge page, object, CDN, reverse-proxy, and opcode caches; check DNS and proxy routing; then test again in a clean browser session.

Staging pages appear in search results

Symptom: Search engines discover duplicate URLs before launch. Fix: Restore access control, use an appropriate no-index strategy while private, remove accidental sitemap exposure, and request removal only after the clone is secured. Do not rely on robots rules alone to protect sensitive staging content.

Forms or webhooks still use production

Symptom: A staging form sends real email, creates production records, or receives callbacks at the old host. Fix: Audit hard-coded endpoints and external services separately from the WordPress URL replacement. Use test credentials and test destinations on staging, and switch to production endpoints only during the approved cutover.

Choose a workflow you can repeat

WP-CLI for scripted migrations

WP-CLI is the most transparent option when you have shell access. Its documented database export/import commands and search-and-replace operation can be placed in a runbook or deployment script, with a dry run required before every replacement. Record the source URL, destination URL, table scope, GUID policy, backup filename, and validation results for each move.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A migration plugin for teams without shell access

A reputable WordPress migration plugin can package files, export the database, and perform a find-and-replace through an administrative interface. Confirm that the current version handles serialized data, multisite if needed, large uploads, and destination authentication. Still keep an independent database and file backup; a plugin does not remove the need for rollback.

Managed WordPress staging

Managed hosting can bundle staging environments, backups, access control, and migration assistance. Verify the provider’s current limits, PHP versions, database size limits, cache behavior, and whether staging can be kept private. Features and terms change, so confirm them for the specific account and date of the move rather than assuming every plan behaves alike.

A compact pre-cutover checklist

  • Source files, wp-content, and database exported and stored safely.
  • Destination PHP, database, document root, and permissions verified.
  • Staging protected from public access and search indexing.
  • home and siteurl set to the exact destination URL.
  • WP-CLI dry run reviewed, then serialization-safe replacement completed.
  • GUID policy and multisite scope explicitly chosen.
  • Rewrite rules and object/page caches flushed.
  • Representative content, media, CSS/JS, forms, search, login, redirects, canonicals, sitemaps, and robots behavior tested.
  • DNS, CDN, web-server rules, cron, email, analytics, and webhooks reviewed.
  • Final backup retained and rollback owner identified before DNS changes.

The WP-CLI common-tasks documentation lists its page as first published March 17, 2026, and last updated October 14, 2026; command behavior and options can change, so check the installed WP-CLI version and its current command help before automating a production move.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

domain changesite migrationstagingwebsite backupWordPressWP-CLI

Leave a reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.