1

I'm preparing to move my Magento 1 store over to Magento 2, but in order to avoid issues or conflicts down the road, I would like to setup Magento 2 on the same server my Magento 1 store is currently on. I know it's possible, and that many people would say it's a security risk, but I wouldn't think that's a problem if I don't plan on running the Magento 1 version any longer after the M2 is setup.

I'm trying to figure out the best way to approach this. Would it be best to setup an entirely new document root for the M2 site? Or would it be best to just create two folders within a single document root, i.e. public_html/sites/magento1 and public_html/sites/magento2? I guess I'd like to know which method would ultimately make it easier to set the Magento 2 site as my live site when it's ready to go.

I don't currently have root permissions on my VPS, but can easily ask my host to set it up for me if two document roots is the best way to approach it.

1

I would stay away from the /sites/magento1, /sites/magento2 option if possible and go with separate document root / host account option.

M2 has different and much newer (stricter) system requirements than M1, so if you need to update modules or PHP versions you won't need to worry about affecting the older codebase / compatibility problems.

Set up your new M2 site as close as possible to how it will remain once it is live to save yourself gotchas later on. You could even setup a subdomain : m2.yourdomain.com and reduce complexity with going-live related stress later on.

Not sure what your VPS setup is but I'm guessing using the same Docroot for both will also mean pooled resource between the two Magento sites, so if you slow/lockup/break the new site you could possible affect the old live site as well.

| improve this answer | |
  • This is the direction I chose to go. I created a separate docroot for Magento 2 and pointed it to a subdomain (mage2.mysite.com). Of course there were some additional other changes to get everything working properly and pointed correctly. With cPanel already installed, it made it easy to get it setup and easy to set the new docroot to PHP7.X – taskle Mar 9 '19 at 1:06
1

M1 and M2 system requirements are different like php version and needed php extension. You can use any virtualization technique like docker, vagrant. I suggest you can use docker, it is very light weight, in this way you can separate the system requirements without any conflict. Alternately, you can achieve without any virtualization technique, directly create two vhost one for M1 and one for M2, you have to enable dual php which means php5.6 for M1 and php7.X for M2, you can do this by .htaccess.

| improve this answer | |

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.