Preparing a WordPress database for migration is one of the most important parts of moving a website between servers, domains, environments or hosting providers.
A WordPress migration is not simply:
export database
↓
import database
↓
finished
The database can contain:
- site URLs;
- filesystem paths;
- serialized PHP values;
- plugin configuration;
- user accounts;
- session-related data;
- scheduled tasks;
- transients and caches;
- API credentials;
- environment-specific settings;
- custom plugin tables;
- WooCommerce or membership data;
- logs and temporary records.
Moving all of that data without first understanding what it contains can produce a site that technically imports successfully but behaves incorrectly afterward.
A reliable database migration therefore has several stages:
inspect
↓
back up
↓
identify environment-specific data
↓
prepare migration strategy
↓
export
↓
import
↓
perform safe replacements
↓
validate
↓
clean up
This guide explains how to prepare a WordPress database before migration, what should and should not be cleaned, how to handle URLs and serialized data safely, how to inspect plugin tables, how to reduce migration risk and how to verify the destination database after import.
Start by defining what kind of migration you are performing
Not every WordPress migration has the same requirements.
You might be moving:
- to a new hosting provider;
- to a new server;
- to a staging environment;
- from staging to production;
- from HTTP to HTTPS;
- to a different domain;
- from a subdirectory to the domain root;
- from one database server to another;
- from a local development environment to production;
- between infrastructure platforms.
A migration with unchanged URLs is simpler
If:
old site
https://example.com
new server
https://example.com
then many stored URLs may remain correct.
The official WordPress migration documentation explains that moving to another server while preserving the same domain and URLs is generally simpler because the database values do not require a broad URL transformation.
A migration with a domain change is more complex
For example:
https://old.example.com
↓
https://www.example.com
or:
https://staging.example.com
↓
https://example.com
means references to the old environment may exist throughout the database.
Prepare a migration inventory first
Before modifying anything, record the current environment.
Useful information includes:
Current domain
Destination domain
Current database name
Destination database name
Current table prefix
Destination table prefix
WordPress version
PHP version
Database server/version
Active theme
Active plugins
Multisite status
Known custom tables
Known external integrations
This gives you a reference when something appears different after migration.
Take a complete backup before preparing the database
Database preparation can involve destructive operations.
Examples include:
- deleting transient data;
- cleaning logs;
- changing URLs;
- removing staging data;
- running search-and-replace operations;
- altering table prefixes;
- removing temporary plugin records.
Before performing any of these actions, create a recoverable backup.
The official WordPress database backup documentation strongly recommends backing up the database regularly and before operations that can affect it.
A database backup is not a complete WordPress backup
The WordPress database contains information such as:
- posts;
- pages;
- comments;
- users;
- settings;
- metadata;
- plugin data.
But it does not normally contain:
- WordPress Core files;
- themes;
- plugins;
- uploaded media files;
wp-config.php;- server configuration files.
The official WordPress Backups documentation explicitly separates a WordPress backup into:
database
+
files
For migration recovery, you normally want both.
TheOneWP Backup Manager
TheOneWP Backup Manager can create complete, database-only and files-only backups before migration-related maintenance.
For a migration, the safest baseline is usually a complete backup created immediately before changes begin.
Store the pre-migration backup separately
Do not keep the only copy inside the server you are about to modify or decommission.
A useful migration backup should remain available even if:
source hosting disappears
destination import fails
database is corrupted
DNS changes unexpectedly
Verify the backup before continuing
A backup that exists only as an unexplored file is not the same as a verified recovery point.
At minimum, confirm:
- the database export exists;
- the export size is plausible;
- the file can be opened or inspected;
- the expected tables are present;
- the corresponding WordPress files are backed up.
Identify the WordPress table prefix
WordPress tables often look like:
wp_posts
wp_postmeta
wp_options
wp_users
wp_usermeta
but:
wp_
is only the default prefix.
A site might instead use:
client_posts
abc_options
wp9_users
The active prefix is defined through:
$table_prefix
in wp-config.php.
Do not export only tables beginning with wp_ without checking
If the site uses another prefix, that assumption can produce an incomplete migration.
Use WP-CLI to inspect registered tables
WP-CLI provides:
wp db tables
The official wp db tables documentation explains that the command can list tables registered with WordPress and can also inspect tables matching the configured prefix.
For example:
wp db tables --all-tables-with-prefix
can help identify tables belonging to the installation.
Inventory custom plugin tables
Many plugins create their own tables.
Examples may include systems for:
- WooCommerce;
- analytics;
- security logging;
- forms;
- email queues;
- backups;
- SEO;
- membership data;
- learning management;
- custom applications.
Do not assume unknown tables are disposable
A table with an unfamiliar name might contain:
- customer orders;
- form submissions;
- subscription records;
- authentication configuration;
- critical workflow data.
Inspect before deleting.
TheOneWP Database Manager can help inspect WordPress database tables and their stored records before migration work begins.
Identify tables that do not belong to WordPress
Some hosting setups place multiple applications inside the same database.
You might encounter:
wp_posts
wp_options
forum_users
legacy_app_logs
crm_contacts
Before exporting the database, determine whether those additional tables:
- belong to the WordPress installation;
- belong to another application;
- need to migrate together;
- should remain behind.
Exporting the wrong scope can create two opposite problems
You may export too little:
missing plugin tables
↓
destination site incomplete
or too much:
unrelated application data
↓
unnecessary or sensitive data copied
Review database size before migration
Before exporting, identify which tables are largest.
A database might be:
350 MB total
wp_posts
40 MB
wp_postmeta
90 MB
analytics_log
180 MB
everything else
40 MB
That tells you immediately where most of the migration weight comes from.
A large database is not automatically unhealthy
A busy ecommerce website can legitimately contain millions of records.
The relevant distinction is:
large because site needs the data
vs.
large because obsolete data accumulated
See WordPress Database Bloat Explained for the broader distinction.
Should you clean the database before migration?
Sometimes.
Migration is a useful opportunity to review unnecessary data, but it is not the ideal moment for uncontrolled database surgery.
Safe candidates may include known disposable data
Depending on the site and plugin behavior, examples can include:
- expired transients;
- known temporary caches;
- obsolete logs;
- old staging-only test records;
- spam comments;
- trashed content that is intentionally no longer needed;
- known disposable plugin caches.
Do not aggressively delete data merely to reduce export size
The migration objective is:
move the site correctly
not:
produce the smallest possible SQL file
Clean only data whose purpose you understand
If you cannot answer:
Which component created this record?
Can it be regenerated?
Does deleting it change business data?
leave it alone until you know more.
Do not clean the live database without a current backup
Migration cleanup and migration preparation are separate actions.
If cleanup fails, you should still be able to restore the source site independently of the migration itself.
Review transients
WordPress and plugins frequently store temporary values called transients.
Many transients can be regenerated automatically.
However, do not assume every option that looks temporary is safe to delete manually.
Plugin developers sometimes use database storage in non-obvious ways.
Review log tables separately
Large logging tables may contain:
- security events;
- analytics history;
- email logs;
- background task logs;
- payment events;
- debug records.
Determine whether the destination needs that history.
A staging migration may need less historical data than a production migration
For example:
production → production
→ preserve required operational history
production → temporary staging
→ some logs may not need duplication
But privacy and compliance requirements must still be considered before deciding what to copy.
Production databases may contain personal data
A database copied to staging can include:
- customer names;
- email addresses;
- order history;
- form submissions;
- user profiles;
- IP addresses;
- private account metadata.
For staging migrations, consider whether production personal data actually needs to be present in the destination environment.
See WordPress Staging Site Best Practices for the broader staging workflow.
Review environment-specific credentials
The database can contain credentials or identifiers tied to the source environment.
Examples include:
- API keys;
- payment gateway settings;
- SMTP credentials;
- webhook URLs;
- OAuth client configuration;
- CDN settings;
- external storage configuration;
- analytics identifiers.
Not every credential should migrate unchanged
For example:
production payment keys
↓
staging database
can create serious problems if the staging environment begins making real requests.
Inventory external integrations before export
Useful categories include:
Email
Payments
CRM
Analytics
CDN
Object storage
Search services
Webhooks
Social login
Maps
External APIs
Prepare destination-specific values
After import you may need to:
- replace production API keys;
- disable outgoing email;
- disable payment processing;
- change webhook destinations;
- update callback URLs;
- change storage buckets;
- change CDN domains.
Review WordPress Address and Site Address
Two fundamental URL values are:
home
siteurl
These normally live in the options table.
The official WordPress migration documentation explains that these values may need to change when moving between domains or locations.
home and siteurl are related but not identical
Conceptually:
home
→ public site address
siteurl
→ location of WordPress application files
On many ordinary sites they have the same value.
They may also be overridden in wp-config.php
WordPress supports:
WP_HOME
WP_SITEURL
If these constants are defined, changing only database options may not produce the result you expect.
Check wp-config.php before assuming the database is authoritative
A site might contain:
define(
'WP_HOME',
'https://example.com'
);
define(
'WP_SITEURL',
'https://example.com'
);
In that case the migration strategy must account for those configuration values too.
Changing only home and siteurl is not enough for a domain migration
WordPress content may contain the old domain in:
- post content;
- post metadata;
- widget settings;
- theme settings;
- plugin options;
- menus;
- attachment metadata;
- custom tables.
You may need a database-wide URL migration
But this must be done safely because some stored values are serialized.
See How to Migrate WordPress URLs Safely for the complete URL replacement process.
Serialized data is the main reason naive SQL replacement is dangerous
WordPress plugins and themes frequently store complex PHP values using serialization.
A simplified serialized value may look like:
a:1:{
s:3:"url";
s:23:"https://oldsite.com";
}
The stored string includes its expected length.
A simple SQL REPLACE() can corrupt serialized values
Suppose you replace:
https://oldsite.com
with:
https://new-longer-domain.com
The string length changes.
A blind replacement may change the text without updating the serialized length metadata.
The result may no longer unserialize correctly.
Do not run a naive database-wide SQL replacement
This kind of operation is risky:
UPDATE wp_options
SET option_value =
REPLACE(
option_value,
'oldsite.com',
'newsite.com'
);
because the affected field may contain serialized data.
The official WordPress migration documentation specifically warns that indiscriminate search-and-replace operations can break serialized data.
Use serialization-aware migration tools
WP-CLI provides:
wp search-replace
The official wp search-replace documentation states that the command intelligently handles PHP serialized data.
Always begin with a dry run
For example:
wp search-replace \
'https://old.example.com' \
'https://new.example.com' \
--all-tables-with-prefix \
--dry-run
The dry run reports what would change without writing the replacements.
Then run the real replacement only after reviewing the result
wp search-replace \
'https://old.example.com' \
'https://new.example.com' \
--all-tables-with-prefix
Use –all-tables-with-prefix carefully
By default, wp search-replace operates on tables registered with the current WordPress database object.
The --all-tables-with-prefix option can include additional tables sharing the WordPress prefix.
This can be important when plugins create custom tables.
Do not automatically search unrelated tables
If multiple applications share the same database, broad replacement can alter data that does not belong to WordPress.
Review HTTPS changes separately
A migration from:
http://example.com
to:
https://example.com
is also a URL migration.
Stored HTTP URLs may otherwise create:
- mixed-content warnings;
- incorrect asset URLs;
- old internal links;
- redirect chains.
Do not replace every occurrence of http:// globally
A database can legitimately contain:
- external HTTP links;
- documentation URLs;
- embedded resources;
- API endpoints.
Replace the specific old site URL, not the protocol string everywhere.
Do not change WordPress GUIDs casually
The guid column in:
wp_posts
has a special purpose.
WordPress migration documentation warns that GUID values should not normally be changed simply because the domain changes.
GUID means Globally Unique Identifier
Its purpose is to identify content uniquely, particularly for feeds and clients consuming them.
It should not be treated as:
current canonical frontend URL
A migration tool should understand the GUID distinction
Do not perform broad manual SQL replacements without knowing whether they will alter GUID fields.
Review filesystem paths stored in the database
Some plugins store absolute server paths such as:
/home/account/public_html/wp-content/uploads/
A destination server might instead use:
/var/www/example.com/public/wp-content/uploads/
Paths and URLs are different migration problems
URL
→ https://example.com/wp-content/uploads/file.jpg
filesystem path
→ /var/www/example.com/public/wp-content/uploads/file.jpg
A correct domain replacement does not automatically fix filesystem paths.
Search for the old server path before migration
If you know the source document root, search the database for that exact path.
Determine which plugin or component stored it before replacing anything.
Paths may also be serialized
The same serialization warning applies.
Use a migration-aware replacement mechanism rather than plain SQL when stored values may contain serialized structures.
Review upload paths
Most modern WordPress installations use standard upload paths automatically.
Older sites or custom installations may contain explicit upload-path configuration.
Check whether the destination server needs different values.
Inspect scheduled tasks and queues
WordPress and plugins may store scheduled events or queue records in the database.
After migration, these can potentially trigger:
- emails;
- webhooks;
- API synchronization;
- payment-related jobs;
- scheduled publishing;
- background processing.
This matters particularly when cloning production to staging
A staging site should not accidentally:
send production emails
process production jobs
call production webhooks
charge customers
Prepare the destination environment before enabling cron
Depending on the application, you may want to:
- disable outgoing email;
- disable payment gateways;
- disable webhooks;
- disable external synchronization;
- pause background workers;
- replace production credentials.
Review caching data
The database may contain:
- transients;
- object-cache-related values;
- page-cache metadata;
- plugin cache tables.
Most caches should not be treated as authoritative migration data.
Clear caches after migration
Even when cache records are included in the export, clear relevant caches after the destination is active.
That may include:
- WordPress object cache;
- page cache;
- server cache;
- CDN cache;
- plugin caches.
Review active plugin compatibility before export
A migration can reveal environment differences such as:
- PHP version;
- database version;
- server extensions;
- filesystem permissions;
- object caching;
- web server software.
The database may contain plugin state created under the old environment.
Do not update everything simultaneously with the migration
A risky sequence is:
new server
+
new PHP version
+
new WordPress version
+
20 plugin updates
+
database cleanup
+
domain change
When something breaks, determining the cause becomes much harder.
Separate variables where practical
A safer migration strategy is:
establish known source state
↓
migrate
↓
verify destination
↓
perform additional upgrades separately
For broader planning, see Planning a WordPress Site Migration: a Checklist.
Decide whether the site needs a content freeze
A static brochure site may be easy to migrate while users continue browsing.
A transactional website is different.
Examples include:
- WooCommerce stores;
- membership sites;
- booking systems;
- forums;
- learning platforms;
- sites receiving form submissions.
A database can change while you are exporting it
During migration, production users may continue creating:
orders
registrations
comments
forms
posts
payments
If the source remains active after the database snapshot is taken, new records may never reach the destination.
Plan the final synchronization window
A common migration flow is:
initial copy
↓
test destination
↓
schedule cutover
↓
temporarily prevent writes
↓
take final database export
↓
import final database
↓
switch traffic
↓
verify
Maintenance mode can help during a write freeze
For migration windows where writes must temporarily stop, a controlled maintenance state can help prevent new frontend changes during the final database transfer.
Keep the freeze as short as practical
The database preparation phase should happen before the actual downtime window whenever possible.
Do not begin discovering table names, credentials or serialization issues after putting the production store into maintenance mode.
Export the database using a reliable method
Common methods include:
- WP-CLI;
- phpMyAdmin;
- MySQL or MariaDB command-line tools;
- hosting control panels;
- migration or backup systems.
WP-CLI database export
WP-CLI provides:
wp db export
The official wp db dump / wp db export documentation explains that the command uses the database credentials defined in wp-config.php.
Basic example
wp db export migration.sql
Include DROP TABLE statements when appropriate
WP-CLI supports:
--add-drop-table
For example:
wp db export migration.sql --add-drop-table
This can simplify restoring into a destination where existing tables should be replaced.
Be extremely careful when importing into an existing destination
If the destination database contains important data, an import containing:
DROP TABLE
can destroy it.
Confirm that the destination is disposable or backed up before importing.
Check the exported SQL file
Before transferring it, verify:
- the file is not empty;
- expected table names appear;
- the export completed without errors;
- the file size is plausible;
- the archive can be decompressed if compressed.
Protect database exports
A WordPress SQL dump can contain:
- user email addresses;
- password hashes;
- private content;
- orders;
- API credentials;
- plugin settings;
- personal information.
Treat SQL exports as sensitive files
Do not leave:
backup.sql
database.sql
site-export.sql
inside a publicly accessible web directory.
Do not leave migration archives on the production server indefinitely
Once they are no longer needed, move them to protected storage or remove them according to your backup-retention policy.
Import into a clean destination database when possible
A clean destination reduces ambiguity.
If you import a source database on top of an unrelated existing WordPress installation, you can create:
- orphaned tables;
- mixed plugin schemas;
- unexpected users;
- conflicting options;
- stale content.
Know whether the destination database already contains tables
Before import:
SHOW TABLES;
or use a database-management interface to inspect the destination.
Check database credentials after moving
If the destination uses a new:
- database name;
- database username;
- password;
- database host;
update wp-config.php accordingly.
The official WordPress migration documentation specifically notes that wp-config.php must be updated when database connection information changes.
Do not store destination credentials in the database migration itself
Database connection credentials normally belong in:
wp-config.php
or an environment-specific configuration system.
Check table prefix consistency
The destination $table_prefix must correspond to the imported WordPress tables.
If:
$table_prefix = 'client_';
but your imported tables are:
wp_posts
wp_options
wp_users
WordPress will not treat them as the expected tables.
Changing the table prefix is not just renaming table files
WordPress user metadata and other stored values can include prefix-related keys.
The official WordPress site URL documentation notes that changing table prefixes can also require updating relevant entries in user metadata.
A migration is usually not the best time to change the prefix unnecessarily
If the migration already includes:
new domain
new hosting
new PHP
new database server
adding an unrelated table-prefix change creates another source of possible failure.
Import the database before running replacements on the destination
A common safe workflow is:
source backup
↓
source export
↓
destination import
↓
destination-specific search-replace
↓
verification
This keeps the original source database unchanged.
Do not destroy the original migration source
If the destination transformation fails, you should be able to:
drop destination copy
↓
re-import clean source export
↓
retry
without returning to production and reconstructing the original state.
Verify database encoding and collation
Check the database and tables for expected:
- character sets;
- collations;
- Unicode support.
A migration should not accidentally convert text into incompatible encodings.
Pay attention to older WordPress databases
Long-lived sites may contain tables using different historical collations.
Do not blindly normalize every table during migration unless you understand the compatibility implications.
Verify the destination after URL replacement
Check:
Settings → General
and confirm:
- WordPress Address;
- Site Address.
Search for the old domain after migration
Use a dry-run search such as:
wp search-replace \
'https://old.example.com' \
'https://new.example.com' \
--all-tables-with-prefix \
--dry-run
If the destination is already migrated, the output should ideally show:
0 replacements needed
or only known values that intentionally still reference the old domain.
Some old-domain references may be legitimate
Examples include:
- historical logs;
- external documentation;
- redirect rules;
- migration records.
Do not mechanically replace every remaining string without understanding its context.
Verify login functionality
After database import and URL updates, confirm:
- login works;
- administrator accounts are present;
- roles are correct;
- password resets work;
- session behavior is normal.
Verify posts and pages
Check:
- titles;
- content;
- featured images;
- custom fields;
- page-builder layouts;
- internal links.
Verify media references
The database may point correctly to uploads while the corresponding files are missing.
Remember:
database says image exists
≠
image file actually migrated
Verify plugin configuration
Open important plugin interfaces and check:
- API integrations;
- license state;
- webhooks;
- scheduled jobs;
- custom tables;
- stored paths;
- environment-specific URLs.
Verify transactional systems carefully
For WooCommerce, membership or booking sites, test:
- orders;
- customer accounts;
- checkout;
- subscriptions;
- payment configuration;
- email workflows;
- background jobs.
Verify cron and background queues
Migration can duplicate scheduled jobs.
Confirm that:
source
and
destination
are not both processing the same external workflow after cutover.
Clear caches after the database is finalized
Once URL replacements and environment changes are complete, clear relevant cache layers.
Otherwise you may continue seeing:
- old domains;
- old HTML;
- old redirects;
- outdated object-cache values.
Regenerate permalinks where appropriate
After migration, visit:
Settings
→ Permalinks
and save the configuration when rewrite rules need regeneration.
The official WordPress migration documentation recommends reviewing permalink and rewrite configuration when moving sites.
Check redirects after a domain migration
If the old domain permanently moves to the new domain:
old URL
→ 301/308
→ corresponding new URL
Do not simply redirect every old page to the new homepage.
Preserve meaningful URL-to-URL relationships wherever possible.
Check canonical URLs
After migration, pages should not continue publishing canonical tags pointing to the old environment.
This can happen if:
- stored URLs were missed;
- SEO settings retain old values;
- cached pages remain;
- custom templates contain hardcoded URLs.
Database preparation should happen before DNS cutover
Do as much work as possible before traffic moves.
For example:
inventory
backup
table audit
plugin audit
staging import
replacement testing
integration review
can all happen before the final cutover window.
The final migration window should be boring
An ideal final cutover is mostly:
freeze writes
↓
take final export
↓
import
↓
run already-tested replacements
↓
switch traffic
↓
verify
That is much safer than discovering database architecture in real time while customers wait.
WordPress Multisite requires additional care
Multisite databases can contain:
- network-wide tables;
- per-site tables;
- site IDs;
- network configuration;
- domain mappings.
WP-CLI also treats Multisite differently for some operations.
The official wp search-replace documentation notes that Multisite requires appropriate network-aware scope when processing all sites.
Do not treat Multisite like a single-site database with more tables
Plan domain and table replacements at the network level.
Common WordPress database migration mistakes
No current backup
Never begin destructive migration preparation without a recovery point.
Exporting only Core tables
Plugin tables may contain essential business data.
Exporting every table in a shared database blindly
You may copy unrelated application data.
Deleting unknown tables to reduce size
Unknown does not mean unused.
Running naive SQL search-and-replace
This can corrupt serialized values.
Changing GUID values indiscriminately
GUIDs are identifiers, not ordinary URL fields.
Replacing every instance of http
External links can be altered incorrectly.
Ignoring filesystem paths
A domain change does not update server paths.
Copying production credentials into staging
This can trigger real external operations.
Keeping both source and destination jobs active
Scheduled events can run twice.
Updating all plugins during the migration
This makes failures harder to diagnose.
Cleaning the database aggressively during cutover
Optimization should not introduce avoidable migration risk.
Forgetting wp-config.php
Database credentials and URL constants can override database behavior.
Forgetting custom tables
Modern WordPress sites often store important data outside the traditional Core tables.
Testing only the homepage
A successful homepage does not prove the database migration succeeded.
WordPress database migration preparation checklist
- Define the migration type.
- Record source and destination domains.
- Record database names and hosts.
- Record the current table prefix.
- Record WordPress, PHP and database versions.
- Inventory active plugins and the active theme.
- Identify Multisite status.
- Create a complete pre-migration backup.
- Store that backup away from the server being migrated.
- Verify the database export.
- Back up WordPress files separately.
- List all WordPress tables.
- Identify custom plugin tables.
- Identify unrelated tables in shared databases.
- Review database size.
- Identify unusually large tables.
- Review logs and temporary data.
- Delete only data known to be disposable.
- Review production personal data before cloning to staging.
- Inventory API keys and external integrations.
- Prepare staging-specific or destination-specific credentials.
- Review
homeandsiteurl. - Check
WP_HOMEandWP_SITEURL. - Search for the old domain.
- Search for old filesystem paths.
- Use serialization-aware URL replacement.
- Use
wp search-replace --dry-runfirst. - Do not blindly modify GUID values.
- Review HTTP-to-HTTPS changes.
- Review cron jobs and background queues.
- Review outgoing email behavior.
- Review payment gateways.
- Review webhooks.
- Review CDN configuration.
- Review object storage configuration.
- Plan the final content freeze.
- Export a final database snapshot during cutover where required.
- Import into a controlled destination database.
- Confirm
wp-config.phpdatabase credentials. - Confirm table-prefix consistency.
- Verify character sets and collations.
- Perform destination-specific URL replacements.
- Verify login.
- Verify users and roles.
- Verify posts and pages.
- Verify custom fields.
- Verify page-builder data.
- Verify media references.
- Verify important plugin settings.
- Verify transactional systems.
- Verify cron and background queues.
- Clear caches.
- Regenerate rewrite rules where appropriate.
- Verify redirects.
- Verify canonical URLs.
- Search again for old domain references.
- Keep the original migration export until the destination is fully verified.
TheOneWP tools for database migration preparation
Backup Manager
Backup Manager provides the recovery layer that should exist before database migration work begins.
It can support:
- complete backups;
- database-only backups;
- files-only backups;
- restore workflows.
Database Manager
Database Manager provides visibility into WordPress database tables and records.
That can be useful when auditing:
- custom tables;
- unexpected records;
- table structure;
- plugin data;
- environment-specific values.
Database Optimizer
Database Optimizer can help clean known categories of unnecessary WordPress database data before migration where cleanup is appropriate.
Optimization should still happen only after a current backup and only for data whose role is understood.
Use the modules in the right order
Backup Manager
→ create recovery point
Database Manager
→ inspect database
Database Optimizer
→ remove known disposable data if useful
migration process
→ export, import and transform
Database Manager
→ inspect destination
Related guides
- Planning a WordPress Site Migration: a Checklist
- How to Migrate WordPress URLs Safely
- Why Serialized Data Breaks Naive WordPress Migrations
- WordPress Database Bloat Explained
- WordPress Staging Site Best Practices
- Settings Export vs. Full Backup: What’s the Difference?
Final recommendation
Preparing a WordPress database for migration should be treated as a controlled data operation rather than simply an export-and-import task.
The safest sequence is:
understand source database
↓
create verified backup
↓
identify required tables
↓
review environment-specific data
↓
export clean source snapshot
↓
import destination
↓
perform serialization-aware replacements
↓
update environment configuration
↓
verify application behavior
Do not delete tables because their names are unfamiliar.
Do not perform broad SQL replacements without considering serialized data.
Do not assume changing home and siteurl migrates every stored URL.
Do not assume the database contains the complete website.
Do not combine migration, aggressive cleanup, plugin upgrades and infrastructure changes unless there is a specific reason to do so.
Most importantly, preserve a clean source export and a recoverable backup until the destination has been fully tested.
A successful WordPress database migration is not the moment the SQL import reports success. It is the moment the destination behaves correctly, contains the expected data, points to the correct environment and can be rolled back safely if something was missed.

