cancel
Showing results for 
Search instead for 
Did you mean: 

Changing base url

Changing base url

I'm trying to change my base url to the production/live name but when I do the site seems to break rather than change url.

 

At the moment its mysite.ie/magento2/ but when I change it to mysite.ie it stills says you don't have permission to access / on this server and everything bar the css works on the mysite.ie/magento2/

 

Does anyone have any clue?

1 REPLY 1

Re: Changing base url

Hi @trent_nguyen,

 

Can you share how you did the change?

I mean, can you share the commands and steps you followed?

 

Or can you check if you're using something different to:

 

  1. Copy files to the new directory
  2. Check the configuration credentials are ok in app/etc/env.php (It should since you're just moving the same instance from directory)
  3. Adjust the URLs (web/unsecure/base_url и web/secure/base_url options) in the database using UPDATE core_config_data SET value = 'http://mysite.ie/' WHERE path IN ('web/secure/base_url', 'web/unsecure/base_url') AND value = 'http://mysite.ie/magento2/';
  4. Refresh your cache with: php bin/magento cache:flush
  5. If you are in production mode you could need to execute: php bin/magento setup:static-content:deploy

Also, can you check your host is properly configured? Maybe using a single php file and trying to access to that file?

Finally, can you check the webserver and Magento error logs to see if there is something that can help to understand if there is another issue?