LavooijMedia
LavooijMedia

Based in Bournemouth since 2015, a full-stack web developer for a digital agency. In my spare time I work as a freelancer and love playing around with new and exciting web stuff and gadgets.

Ruben Lavooij
Author

Share


Tags


On this blog I happily talk about techy, geeky and (for me) fun stuff. I will be talking about all the problems / challenges I find in my day to day job, with examples, and how I have fixed those things. And maybe some of my 3D printing projects.

If you are having problems with your site, or need some work done, do not hesitate to contact me for a quick chat.

07-493102199 or info@lavooijmedia.uk
If calling during work hours leave a message and I will call you back as soon as I can!

Twitter


LavooijMedia

Magento 2 is not loading the style css after server move or migration?

Ruben LavooijRuben Lavooij

Migrating an Magento 2 site comes with its own lot of troubles, for example, you end up with your site, but without styling. Run trough the following steps to get it back up and kicking.

Step 1 - Double check db credentials in env.php, im sure you've done this right, but just do it.

Step 2 - Login to Mysql and go core_config_data: table

and change web/unsecure/base_url and web/secure/base_url values to the right urls.

Step 3 - Delete cache stuffs:

php bin/magento cache:flush
Removes all items in the default Magento cache (var/cache) and the var/full_page cache that have a Magento tag.

php bin/magento cache:clean
This command removes all items in the cache. This is the equivalent of deleting the entire contents of the cache folder on the server.If your system uses an alternate cache location, any cached files used by other applications will be removed.

ORRRRR

rm -rf pub/static/frontend pub/static/adminhtml var/view_preprocessed var/cache

Step 4 - Then run upgrade, compilation and static content deploy :

bin/magento setup:upgrade

bin/magneto setup:di:compile

bin/magento setup:static-content:deploy

There's a chance it started working correctly now! so now is the time to check, still not working, then here's a few additional tips:

a ) Change Files / Folder permission ownership
chown -R www-data:www-data ./magento-folder

b ) Are your SSL settings correct? (secure url is https:// for example)

Still not working? leave a comment below or contact me ;)

Author

Ruben Lavooij

Comments