Showing results for 
Search instead for 
Did you mean: 

Move test site to production

Move test site to production

I created a test site to update my Magento 2.2.3 to the latest version 2.4.6; everything went well, it took me some time, but I managed it, and I fixed everything. my problem now is to bring everything back online, in fact the database I used for the test site dates back to June 2023, and I would like to take at least orders and customers from the site in production. How do I proceed? I can't launch upgrades on the site in production because I did everything in 2 steps, first I moved to 2.3 and then to 2.4; but I didn't take into account the various fixes. Can I copy just some folders from the test site and update the test site db with order and customer tables?


Re: Move test site to production

To move customer and order data from your Magento 2.4.6 test site to your production site running Magento 2.2.3, follow these steps:

1. Backup both sites.
2. Export customer and order data from the Magento 2.4.6 database.
3. Modify and adapt the data to be compatible with Magento 2.2.3.
4. Import this data into your production site's database.
5. Ensure code and folder changes between versions are manually applied to your production site.
6. Thoroughly test your production site.
7. Optimize performance and configurations.
8. Go live once everything works well.

Re: Move test site to production

To move your test site changes to the production site without executing upgrades directly on the live environment, you can follow a staged approach. First, ensure that both the test and production databases are compatible, especially with regards to the Magento version. Then, export the necessary data tables from your test site database, focusing on orders and customer information. Import these tables into the production database, making sure to back up both databases before proceeding. Regarding files, copying specific folders from the test site to production may work, but it's crucial to identify and transfer only those files directly related to your updates. Additionally, carefully manage configuration files, such as env.php and config.php, to avoid inconsistencies. After the data and files are synchronized, thoroughly test the production site in a controlled environment before making it live to ensure a seamless transition.

Re: Move test site to production

When migrating data from a test site to a production site in Magento, it's crucial to be careful and follow the best practices to ensure a smooth transition. Here's a general guideline on how you can proceed:

1. Backup Everything:

Before making any changes, ensure you have a complete backup of both your test and production environments. This includes files, databases, and configurations.

2. Identify Relevant Data Tables:

Identify the tables in your Magento database that contain customer and order data. Key tables include customer_entity, sales_order, sales_order_item, and related tables.

3. Export Data from Test Site:

Export the relevant customer and order data from the test site database. You can use tools like mysqldump or export features within database management tools.


mysqldump -u [username] -p[password] [database_name] customer_entity sales_order sales_order_item >

4. Import Data into Production Site:

On your production site, import the exported data. Ensure you've backed up the production database before proceeding.


mysql -u [username] -p[password] [database_name] <

5. Clear Cache and Reindex:

After importing the data, clear the Magento cache and reindex data.

php bin/magento cache:clean
php bin/magento

6. Adjust Configuration Files:

Review any configuration files that may contain site-specific settings, such as app/etc/env.php and make any necessary adjustments. Ensure that your production site configuration is correctly pointing to the updated database.

7. Test Thoroughly:

Before making the production site live, thoroughly test functionality, including order placement, customer login, and other critical features. This ensures that the imported data integrates seamlessly with the existing production environment.

8. Consider Incremental Upgrade:

If your production site is still running an older version of Magento, consider upgrading it incrementally to avoid potential issues. For example, you could first upgrade to Magento 2.3.x, test thoroughly, and then proceed to 2.4.x.

9. Monitor Logs:

Monitor error logs (var/log in Magento's directory) during and after the import. Address any errors or issues promptly.

10. Inform Stakeholders:

If your production site is live, you mentioned ricepuritytestt and receives regular traffic, inform stakeholders about the upcoming changes and schedule the migration during low-traffic periods.

Always test any process thoroughly in a staging environment before attempting changes on a live production site. Additionally, ensure that both the test and production environments are as identical as possible in terms of configurations and settings.