Magento – magento 2 admin url not working and loaded frontend is all messy
admincssfrontendinstallmagento2
Admin url is showing 404 error after installing magento 2 on wamp
server and frontend design is all messy and css is not linked to it.Error visuals are shown below.
Frontend error:
Best Answer
First of all, apply proper permissions, enable apache rewrite_module and refresh apache server.
For messy frontend, run following command from Magento root:
php bin/magento setup:static-content:deploy
Now clear var directory except .htaccess file and check admin. If you get 404 page, there may be an issue of Symlink. Fot this, Edit apache config file
sudo gedit /etc/apache2/apache2.conf
and replace this code :
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride none
Require all granted
with
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Note: changed AllowOverride none to AllowOverride All
Now restart apache sudo service apache2 restart and check admin. This should fix admin 404 issue.
Also make sure, you don't leave /app/etc/ directory writeable
Check if you are accessing the correct admin url (see admin...frontName node in app/etc/local.xml file)
Try to run the sql below:
SET SQL_SAFE_UPDATES=0;
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
SET SQL_SAFE_UPDATES=1;
Best Answer
First of all, apply proper permissions, enable apache
rewrite_module
and refresh apache server.For messy frontend, run following command from Magento root:
Now clear
var
directory except.htaccess
file and check admin. If you get 404 page, there may be an issue ofSymlink
. Fot this, Editapache config
fileand replace this code :
with
Note: changed
AllowOverride none
toAllowOverride All
Now restart apache
sudo service apache2 restart
and check admin. This should fix admin 404 issue.Also make sure, you don't leave
/app/etc/
directory writeable