October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Move a WordPress Backup to a New Ubuntu VPS Over SSH

Move a WordPress site safely to a new Ubuntu VPS by transferring files with rsync over SSH, restoring the database separately, matching wp-config.php credentials, handling URL changes with WP-CLI, and completing a tested DNS cutover.
Length15 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Move a WordPress site to a new Ubuntu VPS as two coordinated restorations: copy the WordPress files and separately export and import the MySQL or MariaDB database. Use rsync over SSH for repeatable file transfers, restore the database with matching credentials, test the new server privately, and only then change DNS. If the domain changes, run WP-CLI’s serialization-aware search-and-replace with a dry run first.

The safest process is staged: make a known-good rollback point, prepare the complete web stack, transfer files and data independently, validate the application without public DNS changes, then perform a short final synchronization and cutover. Keeping the old VPS available means a failed cutover can be reversed instead of becoming an emergency reconstruction.

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.

What a complete WordPress migration contains

A restorable WordPress backup has two independent parts:

  • Files: WordPress core, wp-content (plugins, themes and uploads), wp-config.php, and server-specific files such as .htaccess when Apache uses it.
  • Database: posts, pages, users, settings, comments, plugin data, menus and other content stored in MySQL or MariaDB.

Copying only the document root cannot restore posts, accounts, settings or plugin data. Conversely, importing only the database leaves the new server without themes, plugins and media. Plan the move around both components and retain a rollback copy of the original VPS until the new site is proven.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • 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.

Do not treat an archive of the web directory as a complete backup unless it also includes a separately exported SQL dump. The database and files can be restored independently, but the final installation works only when they correspond to the same point in time. A plugin, upload or configuration change made between the two backups can otherwise produce confusing differences.

Choose the migration window and make a rollback plan

Inventory the source installation

Before changing anything, record the values that must be reproduced:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Source document root, such as /var/www/example.com.
  • Database name, database user, password, host and WordPress table prefix.
  • PHP version, enabled extensions, and whether PHP runs through PHP-FPM or another handler.
  • Web server and active configuration: Nginx server block or Apache virtual host, rewrite rules and document-root mapping.
  • Enabled plugins and theme, scheduled jobs, TLS certificates and DNS records.

Also note whether the installation is multisite, whether cron is handled by the web request or a system job, and which paths must be writable for uploads or updates. These details explain many post-migration symptoms that look like database errors but are actually web-server or PHP-handler mismatches.

Keep the old VPS online and unchanged while you prepare and test the replacement. Preserve copies of the active web-server configuration, wp-config.php, the database dump and any other files needed to reverse the move. Restrict access to the configuration and SQL files because they may contain database credentials or private site data.

Freeze writes for a consistent backup

A busy site can change between a file copy and a database export. Put the site in maintenance mode or otherwise pause publishing, comments, orders and other writes for the final backup. A short maintenance window gives you the clearest rollback point. If you must copy while the site remains live, schedule a second write freeze and final synchronization immediately before DNS changes.

Record when the freeze began and use that same point for the final database dump and file synchronization. Media uploads are files, while attachment metadata and other references are database rows, so a final pass must include both. Do not declare the backup complete merely because the SQL command returned successfully; verify that the dump file exists and that the file transfer completed without errors.

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

Prepare the new Ubuntu VPS

Install and configure the web stack required by the site: a supported PHP version and extensions, MySQL or MariaDB, and either Nginx or Apache with its PHP handler. Create the destination document root and configure the virtual host or server block before you expose the restored site to visitors.

Create a database and a database user on the new VPS. The name, username, password and host you choose must be the values that will appear in the restored wp-config.php. Grant that user access to the destination database. A database import can succeed while WordPress still fails if the application credentials do not match the account that owns the imported tables.

For example, use a document root such as /var/www/example.com, but do not copy ownership commands blindly from another server. The correct web-server and PHP-FPM user depends on the Ubuntu stack and its service configuration; inspect the active services first.

Prepare an SSH account that can authenticate to the new VPS and write to the temporary transfer location and destination directory. Confirm that rsync is available where you intend to run it, and test a harmless connection before sending the full site. The account used for transfer need not be the account that runs PHP, but the final files must be readable by the web service and writable only where the application requires it.

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

Keep a copy of the destination server configuration as it evolves. A working WordPress directory behind the wrong server block, PHP handler or document root is not a successful restoration, and preserving the configuration makes a rollback or comparison much faster.

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

Rsync versus scp for the file transfer

Capability rsync over SSH scp over SSH
Repeatable migration passes Designed for repeat runs and sends differences after the first pass. Copies the specified files or archive again.
Preview before copying Supports --dry-run (-n). No equivalent migration preview is provided by the basic command.
Attribute handling Archive mode (-a) preserves recursive files, links, timestamps, permissions, ownership, groups and devices. Copies files but does not provide rsync archive-mode synchronization.
Compression -z compresses transferred data. Can transfer an already compressed archive, but the basic copy does not provide rsync’s delta process.
Best use here Primary choice for a large or staged WordPress migration. Fallback for an archive or an individual SQL dump when rsync is unavailable.

The trailing slash in the source path matters. /var/www/example.com/ means “copy the contents of this directory”; omitting it can create an extra directory level on the destination.

--delete is useful for making a staged destination mirror the source, but it is also the most dangerous option in the command. A typo in the destination path or an unexpectedly empty source can remove files from the destination. Always inspect the dry-run list, especially deletions, and make sure the destination path is the intended one before applying it.

Copy WordPress files with rsync

1. Run a dry run

From the source VPS, preview the transfer:

rsync -azvn --delete -e ssh /var/www/example.com/ deploy@NEW_VPS:/var/www/example.com/

Here, -a enables archive mode, -z compresses the stream, -v displays the file list, -n prevents changes, and -e ssh selects SSH as the remote shell. The --delete option makes the destination mirror the source by removing destination files that no longer exist at the source, so review the preview carefully before using it.

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

Check that the preview includes wp-content, the active theme and plugins, uploads, core files, wp-config.php and any required .htaccess. A preview that shows an unexpected nested directory, an empty source, or a large deletion set is a reason to stop and correct the path rather than proceed.

2. Apply the transfer

When the preview shows the intended document root and no unwanted deletions, repeat without the dry-run flag:

rsync -az --delete -e ssh /var/www/example.com/ deploy@NEW_VPS:/var/www/example.com/

Run the command again after later changes; rsync will transfer only differences. Include wp-content, core files, .htaccess where used, and wp-config.php. Treat that configuration file as sensitive because it contains database credentials.

For a staged move, the first pass can happen while the old site is online. The later pass, performed after writes are paused, is the one that closes the gap between the initial copy and DNS cutover. Keep the command output or an operational note so you know which pass represents the final state.

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

Fallback: copy an archive or SQL file with scp

If rsync is not available, authenticated scp can transfer a prepared archive or a dump:

scp wordpress.tar.gz deploy@NEW_VPS:/tmp/
scp wordpress.sql deploy@NEW_VPS:/tmp/

Extract the archive into the destination document root and check that extraction did not add an unintended top-level directory. For a substantial site, rsync remains easier to audit because you can preview and repeat synchronization. An scp transfer that reports success still requires a separate check of the extracted path, ownership and completeness of wp-content.

Export and restore the WordPress database

1. Export on the source VPS

With writes paused, export the database named in the source configuration:

mysqldump -u DB_USER -p DB_NAME > wordpress.sql

Enter the database user’s password when prompted. Keep the dump with the rollback materials and transfer it separately if you used rsync for the files. Use the database name and user recorded during inventory rather than guessing from the site’s domain.

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.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • 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)

The SQL dump is the part that preserves content, accounts, settings and plugin records. A file archive can look complete while the site remains empty or resets to an installation screen if this export was omitted.

2. Import on Ubuntu

After creating the destination database and granting the destination user access, copy the dump to the new VPS and restore it:

mysql -u DB_USER -p DB_NAME < /tmp/wordpress.sql

This pipes the SQL file through the MySQL client into the selected database. Confirm that the imported table names use the same prefix expected by wp-config.php. A mismatch can make WordPress appear empty even though the SQL import completed.

Restore into the database intended for this site, not merely the default database selected by a client. After import, check that the expected WordPress tables are present and that the destination credentials can read them. If the import was performed with one administrative account but wp-config.php names another account, grant the named account access before testing WordPress.

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

Update wp-config.php, ownership and permissions

Edit the restored wp-config.php so its database name, user, password and host match the account you created on the new VPS. Keep the existing table-prefix value unless you intentionally changed it and adjusted every table accordingly.

Set ownership so the account running the web server or PHP process can read the application. Limit write access to directories that genuinely need it, commonly uploads and directories used by the update process. Exact user and group names vary between Nginx, Apache and PHP-FPM configurations; inspect the running service rather than applying a universal ownership command.

Verify that the configured document root points to the directory containing index.php and wp-admin. Confirm that the PHP handler is enabled for that server block and that rewrite rules are loaded. Save a copy of the working configuration before making further edits.

Permissions should solve a specific application need, not simply make the entire tree writable. If WordPress requests FTP credentials, treat that as evidence that the PHP process cannot write where it needs to; identify the active service user and correct the relevant ownership or narrowly scoped write permission.

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

Change the domain safely when the URL changes

Same domain, new server

If the domain and URL remain identical, leave the existing home and siteurl values alone. Concentrate on matching the server block, HTTPS certificate, PHP handler, files, database credentials and DNS destination.

New domain or URL

Run WP-CLI from the restored WordPress directory. Start with a dry run using the exact old and new schemes and hosts:

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

The command searches registered tables and reports what it would change. Review the dry-run output before applying it. WP-CLI’s search-replace operation understands PHP serialized data, which is important for options and plugin records that store strings with embedded lengths. A naïve whole-database text replacement can corrupt those serialized values.

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

Match the complete URL, including http versus https, hostname and any relevant path. A replacement that changes only the hostname can leave mixed schemes or path-based links behind. After applying it, test media, internal links, redirects, forms and administrative login rather than relying only on the front page.

For a multisite installation, use WP-CLI’s appropriate --network and --url options, then test every site in the network. Do not assume that changing the main site has updated each mapped or subdirectory site.

Test the new VPS before changing DNS

Use a temporary hosts-file entry or another private test route so your computer resolves the domain to the new VPS while public DNS still points to the old one. Test the complete visitor and administrator paths:

  • Home page, representative posts and pages, categories, tags and search.
  • /wp-admin login, user roles and the editor.
  • Images and other media, including older uploads and newly uploaded files.
  • Permalinks, redirects, HTTPS enforcement and mixed-content behavior.
  • Forms, comments, mail-dependent features, plugin and theme behavior.
  • Scheduled tasks and any site-specific cron jobs.

Watch Nginx or Apache logs and PHP-FPM logs while exercising these paths. A page that loads is not sufficient if the logs show recurring PHP errors, failed rewrites or permission denials. If testing generates new content, export a final database dump before cutover so that content is not lost when you perform the last synchronization.

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.

Test with the same URL scheme that visitors will use after cutover. Confirm that HTTPS redirects do not loop, that the certificate is served by the intended virtual host, and that uploads actually land in the expected directory. Check at least one old media URL and one newly generated permalink because missing rewrite rules and incomplete uploads often affect only particular paths.

Perform the final synchronization and DNS cutover

  1. Put the old site back into maintenance mode or otherwise pause all writes.
  2. Run one final database export with mysqldump.
  3. Run a final rsync pass from the source document root to the new VPS. Review the dry run first if files changed substantially.
  4. Copy and import the final SQL dump on the destination.
  5. Recheck wp-config.php, the table prefix, ownership, permissions and the active web-server configuration.
  6. Use the private test route to verify the destination one more time.
  7. Change DNS records to the new VPS and monitor access logs and application errors as DNS caches expire.

Keep the old VPS available during DNS propagation. If the replacement fails, point DNS back to the old server and restore the preserved configuration and database snapshot while you diagnose the issue.

Do not reopen publishing on the old host after the final dump. Doing so creates writes that exist only on the old database while visitors may already be reaching the new one. Once DNS has switched, watch both servers until traffic has clearly moved and the application remains healthy.

Maintenance-window versus live cutover

Approach Operational sequence Main trade-off
Maintenance-window migration Pause writes, export the database, copy files, import, test, then switch DNS. Predictable data state, with downtime while writes are paused.
Staged live migration Copy files and an initial database while live, test privately, then pause writes for a final dump and rsync before DNS. Shorter planned interruption, but it requires a disciplined final synchronization to avoid losing writes.

Neither approach removes the need for a final database export when the source has accepted writes after the first backup. The live approach reduces the planned interruption, but it adds coordination: every file and database change made after the initial pass must be represented in the final pass before DNS changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Diagnose common migration failures

“Error establishing a database connection”

Check the database name, username, password and host in wp-config.php. Confirm that MySQL or MariaDB is running, that the database was imported into the intended name, and that the user has privileges on it. Recheck for a typo in the password or a mismatch between the account created on the new VPS and the values copied from the old server.

Visitors are redirected to the old domain

Stale home or siteurl values, or other stored URLs, are usually responsible. Run WP-CLI search-replace with the exact old and new URL, inspect the dry-run report, and then apply it. Include the scheme (http versus https) and host exactly as they appear in the database.

Images are missing or permalinks return 404

Verify that wp-content/uploads and the rest of the document root were transferred, that the server block points to the correct directory, and that rewrite rules are active. Check ownership and permissions for the uploads tree and inspect web-server logs for failed file paths.

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.

WordPress asks for FTP credentials

This commonly means the PHP process cannot write to a directory required for an update or upload. Identify the active PHP-FPM or web-server user, correct ownership, and grant narrowly scoped write permission only where the application needs it.

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.

Only files were copied

A file-only copy cannot restore posts, settings, users or plugin data. Return to the source, create the SQL dump, transfer it, import it into the destination database and align the credentials and table prefix in wp-config.php.

The site loads the wrong content or appears newly installed

This usually points to the wrong document root, an empty destination database, a table-prefix mismatch or a server block routing the domain elsewhere. Confirm the active virtual host, inspect the imported table names, and compare the values in wp-config.php with the database you restored.

Some URLs work but others fail

Check rewrite configuration, the Apache .htaccess file where applicable, and the requested path in the web-server logs. A correct home page does not prove that permalink rules, uploads or the intended PHP handler are active for every request.

Final pre-DNS checklist

  • Both the complete file tree and a current SQL dump exist.
  • The destination database user can access the imported database.
  • wp-config.php contains the intended credentials and table prefix.
  • Document root, rewrite rules, PHP handler, ownership and permissions are verified.
  • Domain replacement, if required, was previewed with WP-CLI and then applied safely.
  • Admin login, content, media, forms, HTTPS, permalinks, scheduled tasks and logs have been tested privately.
  • The old VPS, configuration copy and rollback database remain available until the new site is stable.

Frequently Asked Questions

Can I migrate WordPress by copying only the files with rsync?

No. WordPress files and the MySQL or MariaDB database are separate backup components. Rsync copies the document root, but posts, users, settings, comments and plugin data still require a database export and import.

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

Should I use rsync or scp over SSH?

Use rsync for the main migration because archive mode preserves attributes, a dry run previews changes, and later passes transfer differences. Use authenticated scp as a fallback for an archive or SQL dump when rsync is unavailable.

Do I need WP-CLI if the domain stays the same?

Usually not for URL replacement. Keep the existing home and siteurl values when the domain and URL are unchanged, and concentrate on the server configuration, database credentials, files and DNS. Still test redirects and HTTPS.

Why is a dry run important for rsync and WP-CLI?

The rsync dry run exposes the files and deletions that would be synchronized, while WP-CLI’s dry run reports database replacements before they are applied. Reviewing both helps catch wrong paths, schemes, hosts and destructive changes.

What causes an Error establishing a database connection message after migration?

The database name, user, password or host in wp-config.php may not match the destination account, the database may not have been imported, or the user may lack privileges. Check the service status, imported database and grants.

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

How do I avoid losing orders or comments during cutover?

Pause writes for the final migration window, run a final mysqldump, perform the final rsync, import that dump, test privately and then change DNS. Do not allow new writes on the old VPS after the final export.

What should I do if WordPress asks for FTP credentials?

Identify the user running PHP-FPM or the web server and make sure it can write the required directory. Correct ownership and apply narrowly scoped write permissions instead of making the entire WordPress tree writable.

How should a multisite migration handle URL changes?

Use WP-CLI’s appropriate –network and –url options and test every site. Updating only the main site does not guarantee that mapped or subdirectory sites have the correct URLs.

The Bottom Line

A reliable Ubuntu VPS migration moves both halves of WordPress: synchronize the files over SSH, export and restore the database, align wp-config.php, ownership and server configuration, and use WP-CLI only when a URL change requires it. Test privately, perform a final write freeze and synchronization, then switch DNS while retaining the old VPS and rollback materials until the new site is stable.

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

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.

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.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
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.