We are planning to transfer out test site to the production server.

What must we look out for? What changes ought to be made?


For UBUNTU/LINUX operating system follow below steps.

Step:1 apache/server settings

Run below commands in your server

sudo a2enmod expires
sudo a2enmod ssl
sudo a2enmod rewrite

Now change apache configuration. in apache2.conf file.

sudo nano /etc/apache2/apache2.conf

    <Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted


  <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted 

now after changes you should restart apache.

run sudo service apache2 restart

change magento permission according to system user.

----Apply permission to directory only------

find . -type d -exec chmod 755 {} \;

----Apply permission to files only------

find . -type f -exec chmod 644 {} \;

step: 2 Magento settings

  1. change website mode from current to production mode, before you change mode just compile your current code

    php bin/magento setup:di:compile

  2. after success , you can change website mode

    php bin/magento setup:deploy:mode:production

  3. Set Default Robots "index,follow."

Magento 2.1.* and older version:

Go to Store -> configuration -> general ->  design ->Search Engine Robots tab and then select 'index,follow'.

Magento 2.2.*:

Go to Content -> configuration -> select/edit website row -> Search Engine Robots tab and then select 'index,follow'.
  1. add Google analytics related settings and code.

  2. create site-map.

  3. set magento cron.

  4. merge minify css and js from configuration

  5. enable all Magento cache.

  6. Admin url and password must need to be difficult.

    10.set email sending configuration

Note: Take database backup daily. :)

  • That was a great write up. Impressive work sir. One question: What should I look out if my current setup is on a windows server? – SUPERDEVELOPER Apr 16 '18 at 11:26
  • Nothing to worry , just create source code zip from your current system and extract in new server, after follow above steps. – Emipro Technologies Pvt. Ltd. Apr 16 '18 at 11:30
  • Awesome! You were very helpful. I would also point out, to change the base urls in the core_config_data table at the magento database. Do you know where else should I make similar changes? Maybe .htaccess? – SUPERDEVELOPER Apr 16 '18 at 11:40
  • yes I forget to mention database changes in above list , yes you need to change in .htaccess regarding page speed up changes. – Emipro Technologies Pvt. Ltd. Apr 16 '18 at 11:44
  • if this answer is helpful to you then please approve and up-vote answer so it will be helpful to others also. – Emipro Technologies Pvt. Ltd. Apr 16 '18 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.