Magento Open Source 2.3 - CSS and JS not loading

Magento Open Source 2.3 - CSS and JS not loading

July 17, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento Open Source 2.3 - CSS and JS not loading

Solving CSS and JS Loading Issues in Magento Open Source 2.3

Introduction

Installing Magento Open Source 2.3 is a significant step toward building an e-commerce platform that scales with your business needs. However, some users encounter issues where CSS and JavaScript files fail to load properly during the initial setup or after upgrades.

This post will guide you through identifying and resolving these common problems in a clear, step-by-step manner.

Understanding the Issue

When the CSS and JS files are not loading correctly, you’ll typically see a blank screen with no content. This issue can manifest on both the frontend (customer side) and the backend (admin panel). The console logs might display 404 errors for missing resources like skin/css/blank.css or js/blank.js.

Debugging Step-by-Step

Check Permissions

Before diving into code-level solutions, let’s ensure that your file permissions are correctly set. Magento requires specific permissions to access files and folders.

  1. Navigate to the root directory of your Magento installation using your preferred SSH client or terminal.
  2. Run the following commands to recursively change the ownership and permissions:
chown -R webuser:webgroup .
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

Remember to replace webuser and webgroup with your actual user and group names. This command ensures that the Magento files have the correct read-write permissions.

Verify Configuration Files

Next, let’s inspect the configuration settings in your main.php file for any misconfigurations:

  1. Open your app/bootstrap.php file.
  2. Locate the MAGE_MODE constant near the top of the file. Ensure it is set to either default or production, depending on your current environment.

If you’re still experiencing issues, proceed with the following steps to verify your theme and CSS settings.

Inspect Theme Configuration

  1. Open your terminal or command line.
  2. Navigate to your Magento root directory.
  3. Run the following command to display the current theme:
bin/magento theme:list

This will list all installed themes along with their statuses (enabled/disabled).

  1. Verify that your desired theme is enabled and that there are no conflicts or errors in the output.

If everything appears correct, let’s proceed to check the CSS settings.

Validate CSS Settings

  1. Open your terminal or command line.
  2. Navigate to your Magento root directory.
  3. Run the following command to view the CSS settings:
bin/magento config:show theme/css/merge_css_files

This command should return either 0 (disabled) or 1 (enabled).

  1. If CSS merging is enabled, you can disable it temporarily using this command:
bin/magento config:set theme/css/merge_css_files 0
  1. After making the change, clear your cache and re-run your site to see if the issue persists.

Advanced Troubleshooting

If none of the above steps have resolved your issue, there might be a problem with your PHP or web server configuration.

Check PHP Configuration

  1. Open your terminal or command line.
  2. Navigate to your Magento root directory.
  3. Run the following command to view your PHP information:
php -v

Ensure that you are running at least PHP 7.0.2, as Magento 2 requires this version or higher.

  1. If your PHP version is outdated or incorrect, upgrade it according to your server provider’s instructions.

Verify Web Server Configuration

  1. Open the pub/index.php file in a text editor.
  2. Look for the following lines:
$compilerConfig = [
    'debug' => true,
    'strict_checks' => true,
    'store' => null,
];
  1. Change the strict_checks value from true to false:
$compilerConfig = [
    'debug' => true,
    'strict_checks' => false, // Change this line
    'store' => null,
];
  1. Save the file and clear your cache.
  2. Re-run your site to see if the issue has been resolved.

Conclusion

Resolving CSS and JavaScript loading issues in Magento 2.3 requires a systematic approach that covers permissions, configuration files, theme settings, and PHP/web server configurations. By following the steps outlined above, you should be able to identify and address most common causes of these problems.

Remember to always keep your Magento installation up-to-date by visiting Laravel Company. Regular updates ensure that you benefit from security patches, performance improvements, and new features released by the Magento community.

If you’re still encountering issues or need further assistance, don’t hesitate to consult official documentation or seek help from an experienced Magento developer.

Security Themes Admin Deployment

Our network