{"id":2787,"date":"2026-10-06T17:55:31","date_gmt":"2026-10-06T12:25:31","guid":{"rendered":"https:\/\/ehostpiya.in\/blog\/?p=2787"},"modified":"2026-10-06T17:55:35","modified_gmt":"2026-10-06T12:25:35","slug":"how-to-migrate-magento-to-a-new-server","status":"publish","type":"post","link":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/","title":{"rendered":"How to Migrate Magento to a New Server?"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_88 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#How_to_Migrate_Magento_to_a_New_Server\" >How to Migrate Magento to a New Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#What_Is_a_Magento_Server_Migration\" >What Is a Magento Server Migration?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Why_Move_Magento_to_a_New_Server\" >Why Move Magento to a New Server?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#What_You_Need_Before_Starting\" >What You Need Before Starting<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_1_Check_Your_Current_Magento_Environment\" >Step 1: Check Your Current Magento Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_2_Prepare_the_New_Server\" >Step 2: Prepare the New Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_3_Create_a_Full_Backup\" >Step 3: Create a Full Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_4_Enable_Maintenance_Mode\" >Step 4: Enable Maintenance Mode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_5_Put_the_Old_Store_in_a_Consistent_State\" >Step 5: Put the Old Store in a Consistent State<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_6_Export_the_Magento_Database\" >Step 6: Export the Magento Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_7_Transfer_Magento_Files\" >Step 7: Transfer Magento Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_8_Transfer_the_Database\" >Step 8: Transfer the Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_9_Create_the_Magento_Database_on_the_New_Server\" >Step 9: Create the Magento Database on the New Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_10_Import_the_Database\" >Step 10: Import the Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_11_Configure_Magentos_Database_Connection\" >Step 11: Configure Magento&#8217;s Database Connection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_12_Verify_the_Base_URLs\" >Step 12: Verify the Base URLs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_13_Install_Magento_Dependencies\" >Step 13: Install Magento Dependencies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_14_Set_Correct_File_Ownership_and_Permissions\" >Step 14: Set Correct File Ownership and Permissions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_15_Configure_Magento_Cron\" >Step 15: Configure Magento Cron<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_16_Configure_PHP-FPM\" >Step 16: Configure PHP-FPM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_17_Configure_Redis_if_Used\" >Step 17: Configure Redis if Used<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_18_Configure_the_Search_Service\" >Step 18: Configure the Search Service<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_19_Configure_the_Web_Server\" >Step 19: Configure the Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_20_Install_the_SSL_Certificate\" >Step 20: Install the SSL Certificate<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_21_Test_the_New_Server_Without_Changing_DNS\" >Step 21: Test the New Server Without Changing DNS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_22_Run_Magento_Commands_on_the_New_Server\" >Step 22: Run Magento Commands on the New Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_23_Test_the_Magento_Store\" >Step 23: Test the Magento Store<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_24_Perform_the_Final_Synchronization\" >Step 24: Perform the Final Synchronization<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_25_Change_DNS\" >Step 25: Change DNS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_26_Monitor_DNS_Propagation\" >Step 26: Monitor DNS Propagation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_27_Monitor_the_New_Server\" >Step 27: Monitor the New Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Step_28_Keep_the_Old_Server_Temporarily\" >Step 28: Keep the Old Server Temporarily<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Common_Magento_Migration_Problems\" >Common Magento Migration Problems<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Database_Connection_Error\" >Database Connection Error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#CSS_or_JavaScript_Is_Missing\" >CSS or JavaScript Is Missing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Product_Images_Are_Missing\" >Product Images Are Missing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Admin_Login_Does_Not_Work\" >Admin Login Does Not Work<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Magento_Shows_a_500_Error\" >Magento Shows a 500 Error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-39\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Search_Does_Not_Work\" >Search Does Not Work<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-40\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Cron_Is_Not_Running\" >Cron Is Not Running<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-41\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Emails_Are_Not_Being_Sent\" >Emails Are Not Being Sent<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-42\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#How_to_Minimize_Magento_Migration_Downtime\" >How to Minimize Magento Migration Downtime<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-43\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_1_%E2%80%94_Copy\" >Phase 1 \u2014 Copy<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-44\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_2_%E2%80%94_Configure\" >Phase 2 \u2014 Configure<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-45\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_3_%E2%80%94_Test\" >Phase 3 \u2014 Test<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-46\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_4_%E2%80%94_Freeze\" >Phase 4 \u2014 Freeze<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-47\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_5_%E2%80%94_Synchronize\" >Phase 5 \u2014 Synchronize<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-48\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_6_%E2%80%94_Switch\" >Phase 6 \u2014 Switch<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-49\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Phase_7_%E2%80%94_Monitor\" >Phase 7 \u2014 Monitor<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-50\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Magento_Migration_Checklist\" >Magento Migration Checklist<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-51\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Before_Migration\" >Before Migration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-52\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#During_Migration\" >During Migration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-53\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Final_Cutover\" >Final Cutover<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-54\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#Final_Thoughts\" >Final Thoughts<\/a><\/li><\/ul><\/nav><\/div>\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Migrate_Magento_to_a_New_Server\"><\/span>How to Migrate Magento to a New Server<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Migrating a Magento store to a new server may be necessary when your existing hosting environment no longer provides enough CPU, RAM, storage, performance, or reliability. A migration can also be useful when moving to a better hosting provider, upgrading server hardware, changing operating systems, or moving from shared hosting to a VPS or dedicated server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Magento migration involves more than copying website files. You need to move the database, media files, configuration, Composer dependencies, custom code, and server environment while keeping the store functional.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, you will learn how to migrate Magento to a new server safely, test the new environment, switch the domain, and minimize downtime.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Is_a_Magento_Server_Migration\"><\/span>What Is a Magento Server Migration?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A Magento server migration means moving an existing Magento installation from one hosting server to another.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A typical migration looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Old Server\n    |\n    |  Magento Files\n    |  Database\n    |  Media\n    |  Configuration\n    \u2193\nNew Server\n    |\n    \u2193\nTesting\n    |\n    \u2193\nDNS \/ Domain Switch\n    |\n    \u2193\nLive Magento Store<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is to move the complete application without losing products, customers, orders, configurations, or media.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Move_Magento_to_a_New_Server\"><\/span>Why Move Magento to a New Server?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Common reasons include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Better server performance<\/li>\n\n\n\n<li>More CPU and RAM<\/li>\n\n\n\n<li>Faster storage<\/li>\n\n\n\n<li>Improved network connectivity<\/li>\n\n\n\n<li>Better security<\/li>\n\n\n\n<li>Higher PHP limits<\/li>\n\n\n\n<li>Better database performance<\/li>\n\n\n\n<li>More reliable backups<\/li>\n\n\n\n<li>Improved server monitoring<\/li>\n\n\n\n<li>Scalability for growing traffic<\/li>\n\n\n\n<li>Moving to a Magento-optimized hosting environment<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A properly planned migration can improve both store performance and reliability.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_You_Need_Before_Starting\"><\/span>What You Need Before Starting<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before migrating Magento, make sure you have access to both servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SSH access to the old server<\/li>\n\n\n\n<li>SSH access to the new server<\/li>\n\n\n\n<li>Magento administrator access<\/li>\n\n\n\n<li>Database credentials<\/li>\n\n\n\n<li>Domain\/DNS access<\/li>\n\n\n\n<li>Access to the Magento files<\/li>\n\n\n\n<li>Composer access<\/li>\n\n\n\n<li>Appropriate PHP version<\/li>\n\n\n\n<li>MySQL\/MariaDB access<\/li>\n\n\n\n<li>Required PHP extensions<\/li>\n\n\n\n<li>A recent backup<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For a production store, it is strongly recommended to test the migration on a staging environment first.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Check_Your_Current_Magento_Environment\"><\/span>Step 1: Check Your Current Magento Environment<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before moving anything, document your existing environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the Magento version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check PHP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check Composer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check enabled Magento modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento module:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check indexer status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also record:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP version<\/li>\n\n\n\n<li>Web server<\/li>\n\n\n\n<li>Database version<\/li>\n\n\n\n<li>Magento version<\/li>\n\n\n\n<li>Installed extensions<\/li>\n\n\n\n<li>Cron configuration<\/li>\n\n\n\n<li>SSL configuration<\/li>\n\n\n\n<li>Redis configuration<\/li>\n\n\n\n<li>Search service configuration<\/li>\n\n\n\n<li>CDN configuration<\/li>\n\n\n\n<li>Custom modules<\/li>\n\n\n\n<li>Custom themes<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This information makes it easier to reproduce the existing environment on the new server.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Prepare_the_New_Server\"><\/span>Step 2: Prepare the New Server<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Do not copy Magento files to an unprepared server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install and configure the required software first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on your Magento version, this may include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Linux<\/li>\n\n\n\n<li>Nginx or Apache<\/li>\n\n\n\n<li>PHP<\/li>\n\n\n\n<li>PHP-FPM<\/li>\n\n\n\n<li>MySQL or MariaDB<\/li>\n\n\n\n<li>Composer<\/li>\n\n\n\n<li>Elasticsearch or OpenSearch where required<\/li>\n\n\n\n<li>Redis<\/li>\n\n\n\n<li>SSL<\/li>\n\n\n\n<li>Cron<\/li>\n\n\n\n<li>Required PHP extensions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The exact software versions must match the requirements of your Magento release.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check PHP modules with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -m<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Compare the output with the old server.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Create_a_Full_Backup\"><\/span>Step 3: Create a Full Backup<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before migration, create a complete backup of the existing store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Back up:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Magento files<\/li>\n\n\n\n<li>Database<\/li>\n\n\n\n<li><code>pub\/media<\/code><\/li>\n\n\n\n<li>Custom code<\/li>\n\n\n\n<li>Themes<\/li>\n\n\n\n<li>Configuration<\/li>\n\n\n\n<li>Composer files<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A database backup can be created using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqldump -u DB_USER -p DATABASE_NAME &gt; magento.sql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For compression:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqldump -u DB_USER -p DATABASE_NAME | gzip &gt; magento.sql.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the backup until the new server has been completely tested.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Enable_Maintenance_Mode\"><\/span>Step 4: Enable Maintenance Mode<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">For the final migration, enable Magento maintenance mode so that customers do not place orders while the final database and file changes are being transferred.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:enable<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento maintenance:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For a large store, you can perform most of the migration before maintenance mode and only use a short maintenance window for the final synchronization.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_Put_the_Old_Store_in_a_Consistent_State\"><\/span>Step 5: Put the Old Store in a Consistent State<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before creating the final database backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check indexers:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If necessary, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:reindex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is to start the final migration from a clean and consistent application state.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_6_Export_the_Magento_Database\"><\/span>Step 6: Export the Magento Database<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">On the old server, export the Magento database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqldump -u DB_USER -p DATABASE_NAME &gt; magento.sql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For larger databases:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqldump -u DB_USER -p DATABASE_NAME | gzip &gt; magento.sql.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that the backup file exists:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -lh magento.sql.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not delete the original database until the migration has been successfully completed and verified.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_7_Transfer_Magento_Files\"><\/span>Step 7: Transfer Magento Files<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the required Magento files from the old server to the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A common method is <code>rsync<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -avz \/path\/to\/magento\/ user@NEW_SERVER:\/path\/to\/magento\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For large media directories, <code>rsync<\/code> is particularly useful because it can synchronize only changed files during subsequent transfers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rsync -avz pub\/media\/ user@NEW_SERVER:\/path\/to\/magento\/pub\/media\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also use SFTP or another secure transfer method.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_8_Transfer_the_Database\"><\/span>Step 8: Transfer the Database<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the database backup to the new server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scp magento.sql.gz user@NEW_SERVER:\/home\/user\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then extract it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gunzip magento.sql.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should now have:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>magento.sql<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_9_Create_the_Magento_Database_on_the_New_Server\"><\/span>Step 9: Create the Magento Database on the New Server<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to MySQL or MariaDB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE magento;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a dedicated database user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'magento_user'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Grant the required privileges:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL PRIVILEGES ON magento.* TO 'magento_user'@'localhost';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use a strong database password and avoid using the root database account for Magento.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_10_Import_the_Database\"><\/span>Step 10: Import the Database<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Import the backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u magento_user -p magento &lt; magento.sql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For large databases, monitor the process and make sure the command finishes without errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After importing, verify that tables exist:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u magento_user -p magento<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SHOW TABLES;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see Magento tables.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_11_Configure_Magentos_Database_Connection\"><\/span>Step 11: Configure Magento&#8217;s Database Connection<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Magento stores environment-specific database configuration in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Locate the database configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It may look similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'db' =&gt; &#91;\n    'connection' =&gt; &#91;\n        'indexer' =&gt; &#91;\n            'host' =&gt; 'localhost',\n            'dbname' =&gt; 'magento',\n            'username' =&gt; 'magento_user',\n            'password' =&gt; 'STRONG_PASSWORD'\n        ],\n        'default' =&gt; &#91;\n            'host' =&gt; 'localhost',\n            'dbname' =&gt; 'magento',\n            'username' =&gt; 'magento_user',\n            'password' =&gt; 'STRONG_PASSWORD'\n        ]\n    ]\n],<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update the values to match the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not expose <code>env.php<\/code> publicly because it contains sensitive configuration.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_12_Verify_the_Base_URLs\"><\/span>Step 12: Verify the Base URLs<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If the domain is staying the same, Magento&#8217;s base URLs may not need to change.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the current values:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento config:show web\/unsecure\/base_url<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento config:show web\/secure\/base_url<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the domain is changing, update the URLs accordingly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:store-config:set --base-url=\"https:\/\/new-example.com\/\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:store-config:set --base-url-secure=\"https:\/\/new-example.com\/\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then flush the cache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_13_Install_Magento_Dependencies\"><\/span>Step 13: Install Magento Dependencies<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>vendor\/<\/code> is not being transferred as part of your deployment, install Magento&#8217;s Composer dependencies on the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the Magento root:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For production environments, a deployment commonly uses:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer install --no-dev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The exact Composer workflow should follow your project&#8217;s deployment configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not run arbitrary dependency upgrades during a server migration unless you intentionally want to change software versions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A migration should normally reproduce the existing application environment rather than unexpectedly upgrading it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_14_Set_Correct_File_Ownership_and_Permissions\"><\/span>Step 14: Set Correct File Ownership and Permissions<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure the web server can access Magento files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check ownership:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -la<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Do not use overly permissive settings such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod -R 777 .<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This can create serious security problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the ownership and permissions recommended for your web server and Magento deployment architecture.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_15_Configure_Magento_Cron\"><\/span>Step 15: Configure Magento Cron<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Magento requires scheduled tasks for many background operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check existing cron jobs on the old server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>crontab -l<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then configure the required Magento cron jobs on the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A typical Magento cron configuration uses:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php \/path\/to\/magento\/bin\/magento cron:run<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You may need separate cron entries depending on your Magento version and deployment setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After migration, verify that cron is actually executing rather than simply existing in the crontab.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_16_Configure_PHP-FPM\"><\/span>Step 16: Configure PHP-FPM<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If the new server uses PHP-FPM, verify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP version<\/li>\n\n\n\n<li>PHP-FPM service<\/li>\n\n\n\n<li>Worker configuration<\/li>\n\n\n\n<li>Memory limits<\/li>\n\n\n\n<li>Maximum execution time<\/li>\n\n\n\n<li>Upload limits<\/li>\n\n\n\n<li>OPcache<\/li>\n\n\n\n<li>Required extensions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Check PHP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check PHP-FPM according to your operating system&#8217;s service manager.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento performance can be heavily affected by PHP-FPM configuration, especially on busy stores.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_17_Configure_Redis_if_Used\"><\/span>Step 17: Configure Redis if Used<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If the old Magento installation uses Redis for caching or sessions, configure the new server accordingly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento&#8217;s Redis configuration may be stored in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check whether the old server contains Redis configuration before migration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Redis is installed<\/li>\n\n\n\n<li>Redis is running<\/li>\n\n\n\n<li>Magento can connect to it<\/li>\n\n\n\n<li>Authentication is configured if required<\/li>\n\n\n\n<li>Redis is not unnecessarily exposed to the public internet<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_18_Configure_the_Search_Service\"><\/span>Step 18: Configure the Search Service<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Magento installations may use Elasticsearch or OpenSearch depending on the Magento version and environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the existing configuration before migration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that the required search service is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installed<\/li>\n\n\n\n<li>Running<\/li>\n\n\n\n<li>Accessible by Magento<\/li>\n\n\n\n<li>Configured with the correct host and port<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">After migration, test product search carefully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A store may appear to work normally while catalog search is broken.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_19_Configure_the_Web_Server\"><\/span>Step 19: Configure the Web Server<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Configure Apache or Nginx for the new Magento installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The web server must point to Magento&#8217;s <code>pub<\/code> directory rather than exposing the entire Magento root.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Magento root:\n \/var\/www\/magento\n\nWeb root:\n \/var\/www\/magento\/pub<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Configure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>HTTPS<\/li>\n\n\n\n<li>Rewrite rules<\/li>\n\n\n\n<li>PHP-FPM<\/li>\n\n\n\n<li>Static files<\/li>\n\n\n\n<li>Compression<\/li>\n\n\n\n<li>Security headers<\/li>\n\n\n\n<li>Request limits<\/li>\n\n\n\n<li>Error logging<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the web server configuration appropriate for your Magento version.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_20_Install_the_SSL_Certificate\"><\/span>Step 20: Install the SSL Certificate<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before switching the domain, make sure HTTPS works on the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Test:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Certificate validity<\/li>\n\n\n\n<li>Certificate chain<\/li>\n\n\n\n<li>HTTPS redirect<\/li>\n\n\n\n<li>Mixed content<\/li>\n\n\n\n<li>TLS configuration<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using a CDN or reverse proxy, verify the SSL mode and origin configuration as well.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_21_Test_the_New_Server_Without_Changing_DNS\"><\/span>Step 21: Test the New Server Without Changing DNS<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">This is one of the most important migration steps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not immediately point your live domain to the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, test the new server using a temporary hostname, local hosts-file entry, staging domain, or another controlled method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, you can temporarily map:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>203.0.113.50 example.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">in your local hosts file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This allows you to test the new server while public DNS still points to the old server.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_22_Run_Magento_Commands_on_the_New_Server\"><\/span>Step 22: Run Magento Commands on the New Server<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">From the Magento root, run the necessary deployment commands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:upgrade<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If required:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:di:compile<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:static-content:deploy -f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Reindex if necessary:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:reindex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check indexer status:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:status<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_23_Test_the_Magento_Store\"><\/span>Step 23: Test the Magento Store<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before changing DNS, thoroughly test the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the storefront:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Homepage<\/li>\n\n\n\n<li>Categories<\/li>\n\n\n\n<li>Product pages<\/li>\n\n\n\n<li>Search<\/li>\n\n\n\n<li>Product images<\/li>\n\n\n\n<li>Customer registration<\/li>\n\n\n\n<li>Customer login<\/li>\n\n\n\n<li>Cart<\/li>\n\n\n\n<li>Checkout<\/li>\n\n\n\n<li>Coupons<\/li>\n\n\n\n<li>Shipping<\/li>\n\n\n\n<li>Taxes<\/li>\n\n\n\n<li>Payment methods<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Then test the Admin Panel:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Login<\/li>\n\n\n\n<li>Dashboard<\/li>\n\n\n\n<li>Products<\/li>\n\n\n\n<li>Categories<\/li>\n\n\n\n<li>Orders<\/li>\n\n\n\n<li>Customers<\/li>\n\n\n\n<li>Configuration<\/li>\n\n\n\n<li>Extensions<\/li>\n\n\n\n<li>Reports<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Do not skip checkout testing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A migration can appear successful while payment or shipping integrations are broken.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_24_Perform_the_Final_Synchronization\"><\/span>Step 24: Perform the Final Synchronization<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Once the new server has been thoroughly tested, prepare for the final cutover.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A low-downtime migration can follow this sequence:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Initial file transfer\n        \u2193\nInitial database copy\n        \u2193\nConfigure new server\n        \u2193\nTest new server\n        \u2193\nEnable maintenance mode\n        \u2193\nFinal database backup\n        \u2193\nFinal file synchronization\n        \u2193\nFinal testing\n        \u2193\nChange DNS\n        \u2193\nNew server becomes live<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using <code>rsync<\/code> for the final file synchronization can reduce the amount of data that needs to be transferred during the maintenance window.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_25_Change_DNS\"><\/span>Step 25: Change DNS<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Once the new server is ready, update the domain&#8217;s DNS records.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>example.com \u2192 NEW_SERVER_IP<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and, if applicable:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>www.example.com \u2192 NEW_SERVER_IP<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">DNS propagation can take time depending on TTL values and caching.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the old server available during the transition rather than shutting it down immediately.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_26_Monitor_DNS_Propagation\"><\/span>Step 26: Monitor DNS Propagation<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">After changing DNS, verify that traffic is reaching the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can check DNS resolution with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dig example.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nslookup example.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check from multiple networks if possible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During the transition, some visitors may still reach the old server because of DNS caching.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_27_Monitor_the_New_Server\"><\/span>Step 27: Monitor the New Server<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">After the domain starts pointing to the new server, monitor:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CPU usage<\/li>\n\n\n\n<li>RAM usage<\/li>\n\n\n\n<li>Disk usage<\/li>\n\n\n\n<li>PHP-FPM<\/li>\n\n\n\n<li>Database<\/li>\n\n\n\n<li>Redis<\/li>\n\n\n\n<li>Search service<\/li>\n\n\n\n<li>Magento logs<\/li>\n\n\n\n<li>Web server logs<\/li>\n\n\n\n<li>Checkout<\/li>\n\n\n\n<li>Payment processing<\/li>\n\n\n\n<li>Cron<\/li>\n\n\n\n<li>Email delivery<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Pay particular attention to customer orders immediately after the migration.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_28_Keep_the_Old_Server_Temporarily\"><\/span>Step 28: Keep the Old Server Temporarily<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Do not delete the old server immediately.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep it available until:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DNS has fully transitioned<\/li>\n\n\n\n<li>Orders are working<\/li>\n\n\n\n<li>Customers can log in<\/li>\n\n\n\n<li>Payments are working<\/li>\n\n\n\n<li>Cron is functioning<\/li>\n\n\n\n<li>Emails are working<\/li>\n\n\n\n<li>No critical errors are appearing<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once the new environment has been stable for an appropriate period and your backups are verified, you can safely retire the old server.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_Magento_Migration_Problems\"><\/span>Common Magento Migration Problems<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Database_Connection_Error\"><\/span>Database Connection Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If Magento reports a database connection problem, check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Database hostname\nDatabase name\nDatabase username\nDatabase password\nDatabase server status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Review:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app\/etc\/env.php<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"CSS_or_JavaScript_Is_Missing\"><\/span>CSS or JavaScript Is Missing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Clear Magento cache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento cache:flush<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If necessary, deploy static content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento setup:static-content:deploy -f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also verify web-server permissions and the <code>pub\/static<\/code> configuration.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Product_Images_Are_Missing\"><\/span>Product Images Are Missing<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check whether:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pub\/media\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">was transferred completely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also verify ownership and permissions.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Admin_Login_Does_Not_Work\"><\/span>Admin Login Does Not Work<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Admin URL<\/li>\n\n\n\n<li>Database connection<\/li>\n\n\n\n<li>HTTPS<\/li>\n\n\n\n<li>Cookies<\/li>\n\n\n\n<li>Base URLs<\/li>\n\n\n\n<li>Custom Admin path<\/li>\n\n\n\n<li>Cache<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If you previously changed the Magento Admin URL, make sure the same configuration exists on the new server.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Magento_Shows_a_500_Error\"><\/span>Magento Shows a 500 Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var\/log\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and the web server\/PHP-FPM logs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A 500 error can be caused by:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP incompatibility<\/li>\n\n\n\n<li>Missing PHP extensions<\/li>\n\n\n\n<li>File permissions<\/li>\n\n\n\n<li>Dependency problems<\/li>\n\n\n\n<li>Configuration errors<\/li>\n\n\n\n<li>Extension conflicts<\/li>\n\n\n\n<li>Memory limits<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Search_Does_Not_Work\"><\/span>Search Does Not Work<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check your Elasticsearch\/OpenSearch configuration and make sure the required service is running.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento indexer:reindex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Test product search again.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cron_Is_Not_Running\"><\/span>Cron Is Not Running<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>crontab -l<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then verify that the Magento cron command is using the correct PHP binary and Magento path.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Emails_Are_Not_Being_Sent\"><\/span>Emails Are Not Being Sent<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SMTP configuration<\/li>\n\n\n\n<li>PHP mail configuration<\/li>\n\n\n\n<li>SMTP credentials<\/li>\n\n\n\n<li>DNS records<\/li>\n\n\n\n<li>SPF<\/li>\n\n\n\n<li>DKIM<\/li>\n\n\n\n<li>DMARC<\/li>\n\n\n\n<li>Firewall rules<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Do not assume that email configuration automatically moves with the website.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Minimize_Magento_Migration_Downtime\"><\/span>How to Minimize Magento Migration Downtime<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">For a busy Magento store, downtime should be as short as possible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use a staged migration:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_1_%E2%80%94_Copy\"><\/span>Phase 1 \u2014 Copy<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Transfer the Magento files and database while the old store remains online.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_2_%E2%80%94_Configure\"><\/span>Phase 2 \u2014 Configure<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Prepare the new server completely.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_3_%E2%80%94_Test\"><\/span>Phase 3 \u2014 Test<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Test the new environment without changing public DNS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_4_%E2%80%94_Freeze\"><\/span>Phase 4 \u2014 Freeze<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Put the old store into maintenance mode.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_5_%E2%80%94_Synchronize\"><\/span>Phase 5 \u2014 Synchronize<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Transfer the final database and changed files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_6_%E2%80%94_Switch\"><\/span>Phase 6 \u2014 Switch<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Update DNS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Phase_7_%E2%80%94_Monitor\"><\/span>Phase 7 \u2014 Monitor<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Watch the new server and store carefully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This approach can reduce the final downtime to a short maintenance window.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Magento_Migration_Checklist\"><\/span>Magento Migration Checklist<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Before_Migration\"><\/span>Before Migration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Record Magento version<\/li>\n\n\n\n<li>Record PHP version<\/li>\n\n\n\n<li>Record database version<\/li>\n\n\n\n<li>Record installed extensions<\/li>\n\n\n\n<li>Back up Magento files<\/li>\n\n\n\n<li>Back up the database<\/li>\n\n\n\n<li>Verify backups<\/li>\n\n\n\n<li>Prepare the new server<\/li>\n\n\n\n<li>Install required PHP extensions<\/li>\n\n\n\n<li>Configure the database<\/li>\n\n\n\n<li>Configure PHP-FPM<\/li>\n\n\n\n<li>Configure Redis if required<\/li>\n\n\n\n<li>Configure Elasticsearch\/OpenSearch if required<\/li>\n\n\n\n<li>Configure the web server<\/li>\n\n\n\n<li>Install SSL<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"During_Migration\"><\/span>During Migration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Transfer Magento files<\/li>\n\n\n\n<li>Transfer <code>pub\/media<\/code><\/li>\n\n\n\n<li>Import the database<\/li>\n\n\n\n<li>Configure <code>app\/etc\/env.php<\/code><\/li>\n\n\n\n<li>Install Composer dependencies<\/li>\n\n\n\n<li>Configure cron<\/li>\n\n\n\n<li>Set permissions<\/li>\n\n\n\n<li>Run <code>setup:upgrade<\/code><\/li>\n\n\n\n<li>Flush cache<\/li>\n\n\n\n<li>Compile if required<\/li>\n\n\n\n<li>Deploy static content if required<\/li>\n\n\n\n<li>Reindex<\/li>\n\n\n\n<li>Test the new server<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Cutover\"><\/span>Final Cutover<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable maintenance mode<\/li>\n\n\n\n<li>Create final database backup<\/li>\n\n\n\n<li>Perform final synchronization<\/li>\n\n\n\n<li>Verify the new server<\/li>\n\n\n\n<li>Update DNS<\/li>\n\n\n\n<li>Monitor DNS propagation<\/li>\n\n\n\n<li>Test checkout<\/li>\n\n\n\n<li>Test payments<\/li>\n\n\n\n<li>Test orders<\/li>\n\n\n\n<li>Monitor server logs<\/li>\n\n\n\n<li>Keep the old server temporarily<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Migrating Magento to a new server requires careful planning because the store consists of much more than website files. The database, media, configuration, Composer dependencies, PHP environment, search service, cache, cron jobs, SSL, and web-server configuration all need to work together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The safest approach is to <strong>prepare the new server first, create verified backups, copy the store, test everything before changing DNS, perform a final synchronization, and monitor the new environment after the cutover<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a busy Magento store, use a staged migration and a short final maintenance window to minimize downtime. Never shut down the old server immediately after changing DNS; keep it available until the new environment has been fully verified and your recovery backups are secure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"How to Migrate Magento to a New Server Migrating a Magento store to a new server may be&hellip;","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[138],"tags":[],"class_list":["post-2787","post","type-post","status-publish","format-standard","category-magento","cs-entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Migrate Magento to a New Server? - Web Hosting Blogs by Ehostpiya | Tips and Tricks<\/title>\n<meta name=\"description\" content=\"How to Migrate Magento to a New Server? - Magento\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Migrate Magento to a New Server? - Web Hosting Blogs by Ehostpiya | Tips and Tricks\" \/>\n<meta property=\"og:description\" content=\"How to Migrate Magento to a New Server? - Magento\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/ehostpiya\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-06T12:25:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-06T12:25:35+00:00\" \/>\n<meta name=\"author\" content=\"Vandeeta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vandeeta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/\"},\"author\":{\"name\":\"Vandeeta\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/person\\\/7e99667266ef1b118ad734c1c035d796\"},\"headline\":\"How to Migrate Magento to a New Server?\",\"datePublished\":\"2026-10-06T12:25:31+00:00\",\"dateModified\":\"2026-10-06T12:25:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/\"},\"wordCount\":2266,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\"},\"articleSection\":[\"Magento\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/\",\"name\":\"How to Migrate Magento to a New Server? - Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-06T12:25:31+00:00\",\"dateModified\":\"2026-10-06T12:25:35+00:00\",\"description\":\"How to Migrate Magento to a New Server? - Magento\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-migrate-magento-to-a-new-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Migrate Magento to a New Server?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\",\"name\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\",\"name\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/512.png\",\"contentUrl\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/512.png\",\"width\":512,\"height\":512,\"caption\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\"},\"image\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/ehostpiya\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/person\\\/7e99667266ef1b118ad734c1c035d796\",\"name\":\"Vandeeta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"caption\":\"Vandeeta\"},\"sameAs\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\"],\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/author\\\/ehostpiya_blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Migrate Magento to a New Server? - Web Hosting Blogs by Ehostpiya | Tips and Tricks","description":"How to Migrate Magento to a New Server? - Magento","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/","og_locale":"en_US","og_type":"article","og_title":"How to Migrate Magento to a New Server? - Web Hosting Blogs by Ehostpiya | Tips and Tricks","og_description":"How to Migrate Magento to a New Server? - Magento","og_url":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/","og_site_name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","article_publisher":"https:\/\/facebook.com\/ehostpiya","article_published_time":"2026-10-06T12:25:31+00:00","article_modified_time":"2026-10-06T12:25:35+00:00","author":"Vandeeta","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vandeeta","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#article","isPartOf":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/"},"author":{"name":"Vandeeta","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/person\/7e99667266ef1b118ad734c1c035d796"},"headline":"How to Migrate Magento to a New Server?","datePublished":"2026-10-06T12:25:31+00:00","dateModified":"2026-10-06T12:25:35+00:00","mainEntityOfPage":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/"},"wordCount":2266,"commentCount":0,"publisher":{"@id":"https:\/\/ehostpiya.in\/blog\/#organization"},"articleSection":["Magento"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/","url":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/","name":"How to Migrate Magento to a New Server? - Web Hosting Blogs by Ehostpiya | Tips and Tricks","isPartOf":{"@id":"https:\/\/ehostpiya.in\/blog\/#website"},"datePublished":"2026-10-06T12:25:31+00:00","dateModified":"2026-10-06T12:25:35+00:00","description":"How to Migrate Magento to a New Server? - Magento","breadcrumb":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ehostpiya.in\/blog\/how-to-migrate-magento-to-a-new-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ehostpiya.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Migrate Magento to a New Server?"}]},{"@type":"WebSite","@id":"https:\/\/ehostpiya.in\/blog\/#website","url":"https:\/\/ehostpiya.in\/blog\/","name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","description":"","publisher":{"@id":"https:\/\/ehostpiya.in\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ehostpiya.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ehostpiya.in\/blog\/#organization","name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","url":"https:\/\/ehostpiya.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ehostpiya.in\/blog\/wp-content\/uploads\/2026\/08\/512.png","contentUrl":"https:\/\/ehostpiya.in\/blog\/wp-content\/uploads\/2026\/08\/512.png","width":512,"height":512,"caption":"Web Hosting Blogs by Ehostpiya | Tips and Tricks"},"image":{"@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/ehostpiya"]},{"@type":"Person","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/person\/7e99667266ef1b118ad734c1c035d796","name":"Vandeeta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","caption":"Vandeeta"},"sameAs":["https:\/\/ehostpiya.in\/blog"],"url":"https:\/\/ehostpiya.in\/blog\/author\/ehostpiya_blog\/"}]}},"_links":{"self":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/comments?post=2787"}],"version-history":[{"count":1,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2787\/revisions"}],"predecessor-version":[{"id":2788,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2787\/revisions\/2788"}],"wp:attachment":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/media?parent=2787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/categories?post=2787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/tags?post=2787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}