cancel
Showing results for 
Search instead for 
Did you mean: 

Same server magento multiple store + dev

SOLVED

Same server magento multiple store + dev

Hey,

I dont know if this the best place to ask, but I'm having a little problem with the server. I have a magento 2 installation with 2 stores each one with a different url, that's good, the problem is when I create a clone of the project it goes to the same url at first this seems true it's an exact clone, but I want to have the clone in a different url for example the original is v2.url.com and v2.url2.com and I need the clone to be dev.url.com and dev.url2.com, but when a run 

php bin/magento setup:store-config:set --base-url="dev.url.com"

in the command line of the clone it changes both url, in the clone and original.

It might be relevant, the host is in Massivegrid jelastic.

 

Thanks Smiley Very Happy
 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Same server magento multiple store + dev

@rui_silva1Can you make sure for both the stores you are using separate Database? There is no way with one command values will get change in two different database unless you have replication or something similar.

 

look into <Magento Root Folder>/app/etc/env.php. For both folder this file should have different database to run your Magento on separate URL's.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

View solution in original post

5 REPLIES 5

Re: Same server magento multiple store + dev

Hi @rui_silva1 

You can change the dev url from database table "core_config_data".

You can search row using following query.

SELECT * FROM `core_config_data` where `path` like '%base_url%'


Then you can update url there.

I hope it will help you!

Re: Same server magento multiple store + dev

Hey @Vimal Kumar,

 

Thanks for the reply, unfortunately at the moment I do not have access to the DB but I'll try to get it and try to change there.

 

Thanks Smiley Very Happy

Re: Same server magento multiple store + dev

@rui_silva1Can you make sure for both the stores you are using separate Database? There is no way with one command values will get change in two different database unless you have replication or something similar.

 

look into <Magento Root Folder>/app/etc/env.php. For both folder this file should have different database to run your Magento on separate URL's.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: Same server magento multiple store + dev

Hey,

 

I forgot to mention, it was precisely that, when I made the clone the database IP was directing to the same as the original, I forgot to change that.

Anyway thanks a lot Smiley Very Happy

Re: Same server magento multiple store + dev

Hello!


In the new package version we have removed the binding to database IP. The connection to the database will be established using the DB layer name inside each environment. Also, we have automated Magento configuration for a cloned environment in order to omit manual actions.The new package version is under verification at the moment and will be publicly available in the nearest future.

 

Thanks,