This article describes the possible reasons and solutions for the issue where stylesheets and images do not load after installing Adobe Commerce.
Steps to reproduce
Styles are applied, no UI element looks like missing styles.
Styles are not applied correctly, graphics is missing.
The path to images and stylesheets is not correct, either because of an incorrect base URL or because server rewrites (CentOS, Ubuntu) are not set up properly.
To confirm this is the case, use a web browser inspector to check the paths to static assets and verify those assets are located on the Adobe Commerce or Magento Open Source file system.
Static assets are located under
<magento_root>/pub/static/ , within the
The following are possible solutions depending on the software you use and the cause of the problem:
AllowOverridedirective incorrectly, the static files are not served from the correct location.
includedirective must point to the sample nginx configuration file in your Adobe Commerce/Magento Open Source installation directory. For example:
server_namedirective must match the base URL you specified when installing Adobe Commerce/Magento Open Source. For example:
magento setup:static-content:deploycommand. For details about deploying static files refer to Deploy static view files in our developer documentation.