How To Setup a Blog in Magento 2


To turn your online store into a success, you need regular traffic to your site. If there is high traffic on your store, there is a better chance that your products will sell more.

So naturally, you want traffic on your store as well. And one of the best ways to bring more traffic to your website is through a blog.

Magento is the most popular and feature-rich ecommerce platform. It has many great features, but, unfortunately, it does not have a blog by default. However, you can setup a blog in Magento 2. In this tutorial, I am going to teach you exactly how to do that, so let’s add a blog in Magento 2. I will use the Magefan Blog extension which you can download from here.

Setup Blog in Magento 2

To setup a blog in Magento 2, follow these steps:

  • Flush and Disable Cache.
  • Add Magefan Blog Extension.
  • Run Commands.
  • Add Post.

Flush and Disable Cache

Open the Admin panel of your Magento 2 and go to System → Cache Management.

system to cache

Click on Flush Magento Cache and then disable all cache.

Add Magefan Blog Extension

Go to the root directory of your Magento 2 and explore the app directory. Now create these directories in it: code/Magefan/Blog. You can use FileZilla to do this. The directory structure will now look like this:

Now copy all the folders and files from the Magefan Blog Extension archive into app/code/Magefan/Blog which you downloaded. The final directory structure will now look like this:

Run Commands

Open the SSH terminal and go to the root directory of your Magento 2.

Run this command to upgrade the setup first:

php bin/magento setup:upgrade

Then upgrade the database schema by running this command:

php bin/magento setup:dbschema:upgrade

Now compile the setup using this command:

php bin/magento setup:di:compile

Lastly, deploy the static content with this command:

php bin/magento setup:staticcontent:deploy

Add Post

Now it’s time to add a new post, so go to Content → Posts.

content to post

Hello world post is already added by default; Click on Add New Post.

default post

Enter the Post Title and Description for the post.

add new post

Go to the homepage of your store and click on the menu option for Blog, and you will see this result:

blog in magento 2Ref: magenticians