I have Magento 2.1.9 installed on my cPanel shared hosting account. Everything worked fine until I asked my hosting provider to run the necessary commands during Tawk.to chat integration. The commands he ran made my site to display blank pages.
I managed to get the site back online by running the following commands:
php bin/magento setup:upgrade php bin/magento php setup:static-content:deploy bin/magento cache:flush chmod -R 777 var pub
Even though I can now access my site, but the CSS formatting and JavaScript in both the admin panel and frontend don't work.
See how my admin panel looks like:
Note: In line 607 of the app/etc/di.xml file, I had already changed the following content:
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
to:
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
Does anyone know how to fix this issue?
Please, note that I set the file permissions for the directories below to 777.
/pub/ /pub/static/
And the following have 775 permissions
/pub/static/cache/ /pub/static/frontend/ /pub/static/adminhtml/ /pub/static/_requirejs/
What are the proper file permissions for the above-mentioned directories? 755 or 777?
Please, I'd really appreciate your time and insight in helping me to resolve this issue. Thanks.
Solved! Go to Solution.
@Tarandeep Singh, I can say the issue is over, because I deleted that installation from the server and installed another one. Thanks a lot.
@FlamyTechDo you see any error in browser console? You can also inspect the element and try to browse the URL of JS/CSS file directly in the browser. This will give you more insight on the issue.
Problem solved? Give kudos and accept answer as Solution.
Thanks, but I've already done a fresh installation of Magento.
@FlamyTechIs your issue is resolved or still need help with it?
@Tarandeep Singh, I can say the issue is over, because I deleted that installation from the server and installed another one. Thanks a lot.
@MysehariI believe you need to clear the cache and deploy the static content to make it working. Let know if that works for you.
Problem solved? Please give Kudos.