Magento 2 – admin page 404 after installation.

Magento 2 – admin page 404 after installation. In this post, let’s find out how to fix the error admin page 404 after installation in Magento 2. My environment:

  • Ubuntu server
  • Apache2
  • PHP7

After installing magento 2 , you may get 404 error when visit admin page. In that case, you should check if mod_rewrite module is enabled and loaded using this command:

If you already enabled mod_rewrite, you will get this message:

Or you will get this message if you didn’t enable mod_rewrite:

Then you should run:

In case you still get 404 error after that, open your site config file:

Add or edit:

Then restart your apache:

You can get access to Magento 2 backend now.

Please contact us or leave comment if you get any problem.

Override a Block in Magento 2

Override a Block in Magento 2 – In the last tutorial, you can learn how to create a table and model in Magento 2. Today I’ll tell you how to override a Block in Magento 2.
What we have to do:
– Build a Magento 2 extension structure. I’ll use the module in last tutorial, you can download it here.
– Set preference in di.xml file
– Define a class to override Magento core class.

Continue reading “Override a Block in Magento 2”