{"id":1619,"date":"2026-09-03T16:59:39","date_gmt":"2026-09-03T11:29:39","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-migrate-wordpress-to-new-host-manually\/"},"modified":"2026-09-03T17:02:38","modified_gmt":"2026-09-03T11:32:38","slug":"how-to-migrate-wordpress-to-new-host-manually","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-migrate-wordpress-to-new-host-manually\/","title":{"rendered":"How to Migrate WordPress to a New Host Manually (Files, Database &amp; DNS)"},"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 WordPress to a new web host manually with zero plugins: <strong>1)<\/strong> Compress your WordPress root directory into a <code>tar.gz<\/code> archive, <strong>2)<\/strong> Export your MySQL database via <code>mysqldump<\/code> or phpMyAdmin, <strong>3)<\/strong> Extract the files onto your new host&#8217;s <code>public_html<\/code>, <strong>4)<\/strong> Create a new MySQL database\/user and import the SQL dump, <strong>5)<\/strong> Update database credentials in <code>wp-config.php<\/code>, and <strong>6)<\/strong> Update your domain DNS A record to the new server IP.\n    <\/p>\n<\/div>\n<h2>Why Manual Migrations Outperform Migration Plugins<\/h2>\n<p>While plugins like All-in-One WP Migration or Duplicator are popular, they frequently fail on large websites (over 500MB) due to PHP execution timeouts, web server memory limits, and paywalled restoration file size caps. <strong>Manual migration<\/strong> is 100% free, works on websites of any size (even 50GB+), and guarantees zero file corruption.<\/p>\n<h2>Step 1: Archive WordPress Files on Old Server<\/h2>\n<p>Connect to your old server via SSH or cPanel File Manager and compress your files:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">cd \/home\/username\/public_html\ntar -czf wordpress_files.tar.gz *<\/pre>\n<h2>Step 2: Export MySQL Database Dump<\/h2>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">mysqldump -u old_dbuser -p --single-transaction --quick old_dbname | gzip &gt; db_backup.sql.gz<\/pre>\n<h2>Step 3: Transfer Files &amp; Database to New Server<\/h2>\n<p>Use <code>scp<\/code> or <code>rsync<\/code> to stream data directly between servers over high-speed encrypted SSH tunnels:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">scp wordpress_files.tar.gz db_backup.sql.gz root@new-server-ip:\/home\/newuser\/public_html\/<\/pre>\n<h2>Step 4: Extract Files &amp; Import Database on New Server<\/h2>\n<p>On your new server, extract the archive and restore the database:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Extract files into public_html\ncd \/home\/newuser\/public_html\ntar -xzf wordpress_files.tar.gz\nrm wordpress_files.tar.gz\n\n# Import database into freshly created target DB\ngunzip &lt; db_backup.sql.gz | mysql -u new_dbuser -p new_dbname<\/pre>\n<h2>Step 5: Update wp-config.php Credentials<\/h2>\n<p>Edit <code>wp-config.php<\/code> on the new host to match your new database credentials:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">define( 'DB_NAME', 'new_dbname' );\ndefine( 'DB_USER', 'new_dbuser' );\ndefine( 'DB_PASSWORD', 'NewSecurePassword123!' );\ndefine( 'DB_HOST', 'localhost' );<\/pre>\n<h2>Step 6: Preview via Local Hosts File &amp; Cutover DNS<\/h2>\n<p>Edit your local computer&#8217;s <code>hosts<\/code> file (<code>C:\\Windows\\System32\\drivers\\etc\\hosts<\/code> on Windows or <code>\/etc\/hosts<\/code> on Mac) to preview your domain on the new IP address before updating DNS. Once verified, update your domain registrar&#8217;s A record to the new server IP.<\/p>\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\/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\/blog\/how-to-transfer-domain-name-between-registrars\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Transfer a Domain Name Between Registrars<\/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>High-Speed Server-to-Server Sync via Rsync and SSH Keys<\/h2>\n<p>For large WordPress sites with 20GB+ of media uploads in <code>wp-content\/uploads\/<\/code>, downloading and re-uploading via FTP takes hours. Use <code>rsync<\/code> with delta-transfer algorithms to sync files directly across cloud servers in minutes:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Sync wp-content directory preserving permissions and timestamps\nrsync -avzP -e \"ssh -p 22\" \/home\/olduser\/public_html\/wp-content\/ root@new-server-ip:\/home\/newuser\/public_html\/wp-content\/<\/pre>\n<h2>Fixing File Permissions and Ownership on New Server<\/h2>\n<p>After extracting files, reset ownership to the web server daemon user (<code>www-data<\/code> on Ubuntu \/ <code>nobody<\/code> or cPanel user):<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Reset file and directory permissions\nfind \/home\/newuser\/public_html -type d -exec chmod 755 {} \\;\nfind \/home\/newuser\/public_html -type f -exec chmod 644 {} \\;\nchown -R newuser:newuser \/home\/newuser\/public_html<\/pre>\n<h2>Automating Search-and-Replace Across Serialized PHP Tables<\/h2>\n<p>When migrating WordPress to a new domain name or switching protocol from HTTP to HTTPS, standard SQL <code>UPDATE<\/code> queries corrupt serialized PHP objects. Always use <strong>WP-CLI search-replace<\/strong>:<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Dry-run test (reports changes without modifying database)\nwp search-replace 'http:\/\/olddomain.com' 'https:\/\/newdomain.com' --dry-run\n\n# Execute live search-replace\nwp search-replace 'http:\/\/olddomain.com' 'https:\/\/newdomain.com' --all-tables --precise<\/pre>\n<h2>Post-Migration Sanity Checklist<\/h2>\n<ul style=\"padding-left: 20px;line-height: 1.8\">\n<li>\u2705 <strong>Verify Permalinks:<\/strong> Navigate to <em>Settings &gt; Permalinks<\/em> in WordPress and click <strong>Save Changes<\/strong> to regenerate <code>.htaccess<\/code> rewrite rules.<\/li>\n<li>\u2705 <strong>Clear Object Caches:<\/strong> Flush Redis \/ Memcached: <code>wp cache flush<\/code>.<\/li>\n<li>\u2705 <strong>Re-Issue AutoSSL:<\/strong> Verify that your new server has generated a valid Let&#8217;s Encrypt \/ AutoSSL certificate.<\/li>\n<\/ul>\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\">Migrate to Fast Free Hosting on CpanelFree<\/h3>\n<p style=\"color: #94a3b8;font-size: 14px;line-height: 1.6;max-width: 600px;margin: 0 auto 15px\">\n        Migrate your WordPress website to <strong>CpanelFree<\/strong>. Enjoy high-speed NVMe storage, cPanel control, and unmetered bandwidth at $0 cost forever.\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\">Migrate to Free WordPress<\/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\">How do I update serialized URLs if I am also changing the domain name?<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">Use WP-CLI to perform a safe search-replace without corrupting serialized PHP arrays: <code>wp search-replace 'https:\/\/olddomain.com' 'https:\/\/newdomain.com' --all-tables<\/code>.<\/p>\n<\/div>\n<h2>Verifying SSL and HTTPS Certificates After Server Migration<\/h2>\n<p>Once DNS propagation finishes and visitors route to your new server, verify that an active SSL certificate is provisioned. In cPanel, navigate to <strong>SSL\/TLS Status &gt; Run AutoSSL<\/strong> to ensure automated Let&#8217;s Encrypt certificates cover both your apex domain and www subdomain.<\/p>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4 style=\"margin: 0 0 8px 0;color: #1e293b\">How can I test the migrated site without touching my domain DNS?<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">Add a line to your local computer&#8217;s <code>hosts<\/code> file mapping the new server IP to your domain name (e.g. <code>203.0.113.50 yourdomain.com<\/code>). This directs only your local computer to the new host.<\/p>\n<\/div>\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: Bypassing Maintenance Mode After Migration<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">If your site becomes stuck displaying &#8220;Briefly unavailable for scheduled maintenance&#8221;, delete the temporary <code>.maintenance<\/code> file in your WordPress root directory to restore public access immediately.<\/p>\n<\/div>\n<p>Executing manual WordPress migrations gives developers complete control over file integrity, database consistency, and DNS cutover timing for seamless zero-downtime hosting transfers.<\/p>\n<p>Following these manual migration procedures gives webmasters complete confidence when moving mission-critical web applications between cloud hosting environments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick Answer: To migrate WordPress to a new web host manually with zero plugins: 1) Compress your WordPress root directory into a tar.gz archive, 2) Export your MySQL database via mysqldump or phpMyAdmin, 3) Extract the files onto your new host&#8217;s public_html, 4) Create a new MySQL database\/user and import the SQL dump, 5) Update [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1618,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1619","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\/1619","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=1619"}],"version-history":[{"count":5,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1619\/revisions"}],"predecessor-version":[{"id":1661,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1619\/revisions\/1661"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/1618"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}