{"id":1671,"date":"2026-09-03T17:20:43","date_gmt":"2026-09-03T11:50:43","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-migrate-large-wordpress-sites-without-timeouts\/"},"modified":"2026-09-03T17:23:59","modified_gmt":"2026-09-03T11:53:59","slug":"how-to-migrate-large-wordpress-sites-without-timeouts","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-migrate-large-wordpress-sites-without-timeouts\/","title":{"rendered":"How to Migrate Large WordPress Sites (Over 10GB) Without Server Timeouts"},"content":{"rendered":"<div style=\"background-color: #f8fafc;border-left: 4px solid #14b8a6;padding: 20px;border-radius: 6px;margin-bottom: 25px\">\n<p style=\"margin: 0;font-size: 16px;color: #1e293b\">\n        <strong>Quick Answer:<\/strong> To migrate large WordPress websites (over 10GB) without HTTP 504 timeouts, bypass web plugins entirely and use terminal tools: <strong>1)<\/strong> Perform an initial background file sync with <code>rsync -avzP --exclude 'wp-content\/cache' \/var\/www\/html\/ user@newserver:\/var\/www\/html\/<\/code>, <strong>2)<\/strong> Export the database using <code>mysqldump --single-transaction --quick<\/code>, <strong>3)<\/strong> Stream the SQL dump directly over SSH, and <strong>4)<\/strong> Run a final 30-second delta rsync pass before DNS cutover.\n    <\/p>\n<\/div>\n<h2>Why Standard Migration Plugins Crash on Sites Over 10GB<\/h2>\n<p>When a WordPress site contains over 100,000 media files in <code>wp-content\/uploads\/<\/code> and a multi-gigabyte database, creating a single ZIP or TAR archive exceeds PHP memory limits and exhausts disk space (requiring 2x the site size in free space). HTTP upload requests timeout at 30 to 60 seconds.<\/p>\n<p>Using <strong>rsync delta-transfers<\/strong> and <strong>streamed MySQL pipelines<\/strong> allows you to migrate 50GB to 500GB production stores with <strong>less than 60 seconds of final maintenance window<\/strong>.<\/p>\n<h2>Phase 1: Initial Baseline File Sync (While Site is Live)<\/h2>\n<p>Run the baseline rsync while your source site continues processing traffic normally:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Baseline rsync transfer\nrsync -avzP --delete     --exclude 'wp-content\/cache'     --exclude 'wp-content\/upgrade'     \/home\/sourceuser\/public_html\/ root@new-server-ip:\/home\/targetuser\/public_html\/<\/pre>\n<h2>Phase 2: Live Database Export &amp; SSH Pipeline Streaming<\/h2>\n<p>Stream the database directly from source server to target server memory without saving intermediate disk files:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">mysqldump -u root -p'SourcePass' --single-transaction --quick --max_allowed_packet=512M source_dbname | gzip | ssh root@new-server-ip \"gunzip | mysql -u root -p'TargetPass' target_dbname\"<\/pre>\n<h2>Phase 3: Final 30-Second Delta Sync &amp; DNS Cutover<\/h2>\n<p>Put your source site into temporary read-only mode, run the final rsync pass (which only copies new media uploaded since the baseline pass in seconds), and update your DNS A records:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Final 30-second delta sync\nrsync -avzP --delete \/home\/sourceuser\/public_html\/ root@new-server-ip:\/home\/targetuser\/public_html\/<\/pre>\n<div style=\"background-color: #f8fafc;border: 1px solid #e2e8f0;border-left: 4px solid #0ea5e9;padding: 20px;border-radius: 8px;margin: 30px 0\">\n<h3 style=\"margin-top: 0;color: #0f172a;font-size: 18px;display: flex;align-items: center\">\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul style=\"margin: 10px 0 0 0;padding-left: 20px;line-height: 1.8\">\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-export-import-large-mysql-database-command-line\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Export &amp; Import Large MySQL Databases via CLI<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-migrate-wordpress-to-new-host-manually\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Migrate WordPress Manually (Zero Plugins)<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/what-is-dns-ttl-best-values-before-migration\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">What is DNS TTL and Best Pre-Migration Values<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Explore $0 Free cPanel Web Hosting Plans<\/a><\/li>\n<\/ul>\n<\/div>\n<h2>Tuning Rsync Bandwidth Limits and SSH Ciphers for High-Speed Transfers<\/h2>\n<p>When syncing 50GB+ across cloud VPS servers, encrypting data with heavy default ciphers (like AES-256-GCM) can bottleneck CPU throughput. Speed up network transfers by specifying the lightweight <strong>chacha20-poly1305<\/strong> cipher:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># High-throughput rsync transfer\nrsync -avzP -e \"ssh -c chacha20-poly1305@openssh.com -p 22\"     --exclude 'wp-content\/cache'     \/var\/www\/html\/ root@new-server-ip:\/var\/www\/html\/<\/pre>\n<h2>Handling Large Database Table Partitioning (wp_postmeta &amp; wp_posts)<\/h2>\n<p>On enterprise databases where <code>wp_postmeta<\/code> exceeds 5 million rows, export tables individually to optimize system memory buffers:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Export structure first\nmysqldump -u root -p --no-data dbname &gt; db_structure.sql\n\n# Export data with extended inserts\nmysqldump -u root -p --no-create-info --quick --extended-insert dbname &gt; db_data.sql<\/pre>\n<h2>Enterprise Command-Line Migration Protocol (Step-by-Step)<\/h2>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># 1. Establish SSH Key Authentication between servers\nssh-copy-id -i ~\/.ssh\/id_rsa.pub root@new-server-ip\n\n# 2. Baseline Rsync Sync (Non-Blocking)\nrsync -avzP --exclude 'wp-content\/cache' \/var\/www\/html\/ root@new-server-ip:\/var\/www\/html\/\n\n# 3. Stream MySQL Snapshot Dump directly over SSH Socket\nmysqldump -u root -p'SourcePass' --single-transaction --quick --routines --triggers dbname | gzip -1 | ssh -c chacha20-poly1305@openssh.com root@new-server-ip \"gunzip | mysql -u root -p'TargetPass' target_dbname\"\n\n# 4. Final Delta Sync Pass (30 Seconds)\nrsync -avzP --delete --exclude 'wp-content\/cache' \/var\/www\/html\/ root@new-server-ip:\/var\/www\/html\/\n\n# 5. Fix POSIX Permissions on Target Server\nssh root@new-server-ip \"chown -R www-data:www-data \/var\/www\/html &amp;&amp; find \/var\/www\/html -type d -exec chmod 755 {} \\; &amp;&amp; find \/var\/www\/html -type f -exec chmod 644 {} \\;\"<\/pre>\n<h2>Handling WooCommerce Active Orders and Session State<\/h2>\n<p>To ensure zero lost customer orders during migration, temporarily enable maintenance mode on the checkout page for 60 seconds while the database snapshot is streamed. Once the new server receives the final SQL dump, update your Cloudflare DNS IP to cut over traffic instantly.<\/p>\n<div style=\"background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);border: 1px solid #334155;border-radius: 12px;padding: 25px;margin: 30px 0;text-align: center\">\n<h3 style=\"color: #38bdf8;margin-top: 0;font-size: 20px\">Host High-Traffic WordPress on CpanelFree<\/h3>\n<p style=\"color: #94a3b8;font-size: 14px;line-height: 1.6;max-width: 600px;margin: 0 auto 15px\">\n        Deploy large websites with unmetered NVMe SSD storage, cPanel control, and LiteSpeed caching at 100% zero cost on <strong>CpanelFree<\/strong>.\n    <\/p>\n<p>    <a href=\"https:\/\/cpanelfree.com\/free-wordpress-hosting\" style=\"display: inline-block;background-color: #14b8a6;color: #ffffff;padding: 10px 22px;border-radius: 6px;text-decoration: none;font-weight: bold;font-size: 14px\">Deploy Free WordPress Site<\/a>\n<\/div>\n<h2>Frequently Asked Questions<\/h2>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4 style=\"margin: 0 0 8px 0;color: #1e293b\">What happens if the rsync process disconnects halfway through?<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">The <code>-P<\/code> (partial and progress) flag allows rsync to resume exactly where it was interrupted without re-downloading previously transferred files.<\/p>\n<\/div>\n<h2>Managing InnoDB Buffer Pool and Memory During Multi-Gigabyte Imports<\/h2>\n<p>When importing massive 10GB+ databases via command line, temporarily adjust MySQL server variables to accelerate transaction commit throughput:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Pre-import MySQL performance optimization\nSET autocommit=0;\nSET unique_checks=0;\nSET foreign_key_checks=0;\n\n# Import SQL dump\nSOURCE \/var\/backups\/dump.sql;\n\n# Re-enable consistency checks\nCOMMIT;\nSET unique_checks=1;\nSET foreign_key_checks=1;<\/pre>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4 style=\"margin: 0 0 8px 0;color: #1e293b\">Why is mysqldump faster than phpMyAdmin for big databases?<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">mysqldump runs directly in the Linux shell as a compiled C binary with direct socket access, bypassing PHP memory limits, web server request timeouts, and browser upload constraints completely.<\/p>\n<\/div>\n<h2>Automating Large Site Migrations with Screen \/ Tmux Background Sessions<\/h2>\n<p>When running multi-hour rsync transfers or large SQL restores, a dropped SSH connection can terminate the process. Always launch a <strong>tmux<\/strong> or <strong>screen<\/strong> session before starting:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Start persistent tmux session\ntmux new -s migration_session\n\n# Re-attach anytime if SSH disconnects\ntmux attach -t migration_session<\/pre>\n<div style=\"background-color: #f1f5f9;padding: 15px;border-radius: 8px;margin: 20px 0\">\n<h4 style=\"margin-top: 0;color: #1e293b\">Pro Sysadmin Tip: Optimizing Network MTU for Jumbo Frames<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">If migrating between VPS instances within the same cloud data center (private network), enabling Jumbo Frames (<code>MTU=9000<\/code>) increases rsync throughput by up to 25% by reducing packet header overhead.<\/p>\n<\/div>\n<p>Executing terminal-based rsync and streamed MySQL dumps ensures enterprise-grade data consistency and zero timeout errors regardless of site size.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick Answer: To migrate large WordPress websites (over 10GB) without HTTP 504 timeouts, bypass web plugins entirely and use terminal tools: 1) Perform an initial background file sync with rsync -avzP &#8211;exclude &#8216;wp-content\/cache&#8217; \/var\/www\/html\/ user@newserver:\/var\/www\/html\/, 2) Export the database using mysqldump &#8211;single-transaction &#8211;quick, 3) Stream the SQL dump directly over SSH, and 4) Run a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1670,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1671","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=1671"}],"version-history":[{"count":4,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1671\/revisions"}],"predecessor-version":[{"id":1715,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1671\/revisions\/1715"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/1670"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}