Blogging is one the most effective ways to keep your users engaged and drive more traffic to your website. While ecommerce stores primary purpose is to sell their products online, it is very vital to always keep fresh content coming up so that search engine keep crawlinging your site for new data and would also rank your websites high. Blogging is the ultimate solution for this where by you can post new contents in your website related to the products that you are offering to sell and tips and tricks for the same. It also acts as a platform to provide new updates, offer, coupon codes, etc to your customers. Though Magento 2 contains numerous features for carrying all the operations related to the ecommerce part of your site, it does not have blog feature integrated in it by default. But we can have the blog feature included easily by just integrating a module. Blog being so important for your ecommerce sites, lets look at how to integrate Blogging module with Magento 2.
Before we get into integrating Blog module with Magento 2, you will have to first download the Blog module package. In this tutorial, we will be using Magento 2 Blog Extension provided by MageFan. You can download the package from the following link:
https://github.com/magefan/module-blog
For using MageFan modules, you be needing MageFan's Community module and you can download the same from the following link:
https://github.com/magefan/module-community
If you have your site deployed in production mode, it is good to change it to developer mode:
1. Login to your server via SSH terminal (putty).
2. Navigate to the docroot of your magento installation.
3. Enter the following command in the terminal:
php bin/magento deploy:mode:set developer
Disable cache:
1. Enter the following commands in the terminal to flush and disable cache:
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento cache:disable
Installing MageFan's Community & Blog Module:
1. Connect to your website server via FTP program like FileZilla.
2. Navigate to the following path:
{docroot}/app/code/
3. Create a new folder "Magefan" and double click on to enter into the directory.
4. In this directory, create a new folder "Blog" and double click on to enter into the directory.
5. Your folder structure should be like the following:
6. Now upload the Blog module files into the Blog folder such that the folder and files structure looks like the below:
7. Now go one level up on the folder directory so that you are currently on the "Magefan" folder.
8. In this directory, create a new folder "Community" and double click on to enter into the directory.
9. Your folder structure should be like the following:
10. Now upload the Community module files into the Community folder such that the folder and files structure looks like the below:
11. Execute the following commands from the SSH terminal (putty) in the following sequence:
php bin/magento setup:upgrade
php bin/magento setup:db-schema:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:flush
php bin/magento cache:clean
12. The Community & Blog module would be installed and to check if it is successfully installed, enter the following commands:
php bin/magento module:status Magefan_Community
php bin/magento module:status Magefan_Blog
13. Now that the module is installed successfully, login to the admin and navigate to Stores -> Configuration.
14. Navigate to MageFan Extensions -> Blog and choose the Enable Extension to Yes.
15. Once you have enabled the module, you will start to see new menu item "Blog" on the frontend of the site and this page would list the blog posts.
16. On the admin panel, navigate to Content -> Blog -> Posts.
17. Click on Add New Post button to add new blog post and the same would get listed in the blog listing page.
18. You can also manage categories, tags, and review comments using this module.
Feel free to post in comments you queries and doubts.