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
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:
Module rewrite already enabled
Or you will get this message if you didn’t enable mod_rewrite:
Enabling module rewrite
To activate the new configuration, you need to run:
service apache2 restart
Then you should run:
sudo service apache2 restart
In case you still get 404 error after that, open your site config file:
sudo nano /etc/apache2/sites-available/000-default.conf
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 – 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.
Create model in Magento 2- If you’re creating your own Magento 2 module, may be you will need your extension to be able to create a table during module installation or upgrade process. We will create a model connect with this table also. You can download the package of the last version here
Continue reading “Create model in Magento 2”
Create layout in Magento 2- In part 1, we already created a simple Magento 2 module with a controller. You can view the tutorial here and download the package.
Next, we’re going to create layout for this controller.
Continue reading “Create layout in Magento 2”
Controller in Magento 2 – In this tutorial, we’re creating a magento 2 module, a “Hello World”-style module.
The goal of the module will be simply to write some sentences to the website.
Continue reading “Controller in Magento 2”
How to install Magento 2 – In this tutorial, we’re going to install magento 2 on web server. I’m using localhost. you also can use your VPS or shared hosting.
Continue reading “How to install Magento 2 ?”