Hello, I'm very new to Magento 2. I've tried googling this, but could not find the right solution.
I currently have a website up and running, however, I don't want to be constantly editing the website and risk breaking it while customers are already interacting with it.
I run Magento 2.4.3 on an Ubuntu 20.04 VM instance.
The problem is, as I understand, changes in the admin page of Magento are saved in the database. So, for example, if I've made an exact duplicate of my production website, edited it in my local environment and ready to make it the new production website, what would the process be? If the customers' data is stored in the database, wouldn't uploading the new configurations to the database from the local environment delete my customers' data?
Is there a better way of making a local/testing environment? All I want is the ability to not mess with my site that is currently live while trying to experiment with it.
First of all, take backup of your live store and download it in your local
Now, set up that in your local and apply your required changes
When you find the desired success in your local store, update it to your live and apply the same changes in the admin that you've applied earlier on the local's admin.
For more detail, please refer this:
Okay, let's say I create a staging server that is the exact duplicate, set its URLs to the staging one, how do I deploy it to the production?
Files are simple, I can just override the ones in the production server with the staging ones, but how about the database? If I understand correctly, things like product data, configuration data, settings (in admin page) are all stored in the database. If I try to import the staging database, wouldn't that override customer data such as transaction history and anything else that gets saved in the database?
Hi @gaccincogm60cb
I suggest you to use version control like Git to track files modifications.
For the database changes like product import, system configuration values changes, you should not import staging database to the production website.
For products import you can create a csv file and test import it in staging site. If it works fine then same file you can import to the production website.
For the system configuration changes you should make the changes directly on production website once you have tested those changes in the staging website.
Thanks
Ah, so just make changes in the testing server then manually re-do the configurations that were made?
Feels like that would be time consuming for things like page customization or configuring modules.