I changed my Magento server but at moment not working. Changed: 1. web/unsecure/base_url = 2. web/secure/base_url = 3. Clean Cache 4. Restart Apache

Now: - Stylesheet not loading - Admin not working - All pages going to 404

In the old server path (Sub-domain): https://www.website.com/stoer

in the new server temporary URL (main domain):

Thank you for your consideration


1 Answer 1


Please check all below steps:

  1. First off all see that the database is exported to the new server.
  2. Then transfer the magento root files to the new server.
  3. In the root folder, change to the new database. You can do this by going to app/etc/env.php and changing the DB array information. change the host, dbname, username and password to the new one.
  4. Then you change you secure and unsecure URLs in the magento DB core_config_data to the new IP, don't forget the "/" after your IP, it's required.
  5. Make the web user owner of the new file ( for apache it's: sudo chown -R www-data /var/www/magentoroot ). Set the correct file and folder permissions.
  6. Finally clear the cache by running bin/magento cache:clean and bin/magento cache:flush.

If still not load CSS etc then run below all command to regenerate all css/js in pub folder.

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin\magento indexer:reindex
php bin/magento cache:clean

I hope it will help for you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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