I'm currently working a Magento 2 (2.1.14 exactly) mutli-store website and I have some problems for create a development website. I'm the only back-end developer in the company and had never work on Magento 2 before so I'm learning little by little how does it works.
We need to upgrade the Magento version, some plugins and add some functionnalities but I really need to have a clean development setup to work in, without the fear to break the production website.
Problem ⚠️
Current mode : developer
I followed these steps below but the dev website (dev.mywebsite.ch) still redirect me on the production server (www.mywebsite.ch).
- Create folder on server
dev.website.ch
- Create a sub-domain and point to the newly created folder
- Copy all files and folders in it with
rsync -avz source/* dest/
- Create a database dump file
dump.sql
- Clean the dump file (advice from MgtCommerce) like
sed "s/\/\*[^\/]*DEFINER.*\*\///" dump.sql > clean_dump.sql
- Import the dump file in the suitable DB
- Change the database detail in
app/etc/env.php
- Change base URL and base secure URL in
core_config_data
table in the dev database
I also executed all commands I use when I want to upload a new thing/bug fix (SSH) :
chmod 775 /home/cloudpanel/htdocs/*/ -R
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy en_US fr_FR de_DE
php bin/magento cache:flush
php bin/magento cache:clean
Questions I used...