0

I have installed Magento 2.4.2 in ubuntu, but after the installation process when I run the front and backend URL, it's not working properly,

I have installed Magento 2.4.2 using the command line.

PHP 7.4 version,

enter image description here

enter image description here

please help me with this issue, I have tried everything possible ways but it's not resolved yet. thanks.

2
  • Check module rewrite enabled or not. – Amit Saini Mar 3 at 10:16
  • open 404 error link in new tab and remove "verson161476..." slug and check it's working in new tab or not – Sagar Dobariya Mar 3 at 11:42
1

Run below commands :

  1. sudo php bin/magento setup:static-content:deploy
  2. sudo php bin/magento c:c
3
  • i have run all command 3 times but no changes are done. – rakesh. sumeshara Mar 3 at 10:02
  • even i checked permission also, all persmissions are correct – rakesh. sumeshara Mar 3 at 10:03
  • Try sudo php bin/magento setup:upgrade sudo php bin/magento c:f – Hamendra Sunthwal Mar 3 at 10:05
0

Try to run below commands:

sudo php bin/magento sampledata:reset
sudo php bin/magento setup:upgrade
sudo php bin/magento cache:flush
0

Ensure that your webserver document root is configured correctly. It should be serving Magento from magento_root_folder/pub.

For more information see the following official documentation:

https://devdocs.magento.com/guides/v2.4/install-gde/tutorials/change-docroot-to-pub.html

0
  1. symlink

Create symlink of pub/media and pub/static directory in root.

ln -s /{path}/pub/media /{path}/media

ln -s /{path}/pub/static /{path}/static

example:

ln -s /var/www/html/m242/pub/media /var/www/html/m242/media

ln -s /var/www/html/m242/pub/static /var/www/html/m242/static

2
  • don't remove .htaccess file from pub/static Folder. – Wajahat Bashir Mar 10 at 12:36
  • No, there is no need to remove .htaccess file from pub/static Folder. – PG Sutariya Mar 11 at 4:57
0

set base url in core_config_data in magento db -

UPDATE core_config_data SET value='http://localhost/magento242/pub/' WHERE path='web/unsecure/base_url';

This works for me.

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.