0

I just upgraded my Magento setup from 2.2.3 to 2.4.4 and all went good but after running setup:upgrade command i tried to access the website and it load without any php error but all files serving from "pub" directory giving 404 error, their path doesn't contain "pub".

This is the error in the URL for all of the files:

GET https://domain.com/media/wysiwyg/icon4.png 404

and the path should be here

https://domain.com/pub/media/wysiwyg/icon4.png

1 Answer 1

0

Finally found the solution.

Step:1. Add this in app/etc/env.php

'system' => [
    'default' => [
        'web' => [
            'unsecure' => [
                'base_media_url' => '{{secure_base_url}}pub/media/',
                'base_static_url' => '{{secure_base_url}}pub/static/'
            ],
            'secure' => [
                'base_media_url' => '{{secure_base_url}}pub/media/',
                'base_static_url' => '{{secure_base_url}}pub/static/'
            ]
        ]
    ]
]

Step:2. Run bin/magento app:config:import or bin/magento setup:upgrade if there is any error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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