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

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:db-schema: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:static-content: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 2

Conclusion

A blog is a necessity for any online store in terms of traffic. You can inform your customers about the products they are buying and possible discounts you may be offering, which increases the chance that the customer will buy the product. After following this tutorial, you should now be able to setup a blog in Magento 2. You can share your thoughts by using the comment box below.

About Author

Syed Muneeb Ul Hasan is an expert in PHP and Magento, he prefers to educate users in implementing and learning Magento. When not working, he loves to watch cricket.

2 Comments

  1. NCode Technologies on

    Really great guide to add blog option in Magento 2. Blog is one of the most important aspects of each and every websites now a days. It’s the place where you post your content, offers, coupon codes and getting subscribers etc. If you have an interactive blog on your website, it can help you to get more visitors. What makes this post unique is the graphical presentation of every steps. Thanks for the guidance.