Published on : July 6, 2019 by Andy Robert
Product descriptions, content pieces, and reviews are essential in helping your customers decide what to buy or which option to choose. As you may know, simply selling products is not enough to attract loyalty from customers. Regularly updating contents or adding a new one is one of the best ways to increase the SEO ranking. And the easiest way is to use a blog, where you can post articles related to your store and provide informative content by directly interacting with the visitors about your business, offers, or products. Magento does not have a builtin system for blogging but can be easily integrated with WordPress, combining both of their features.
Below are the steps you will have to follow to integrate WordPress with your Magento store.
The first step, of course, is to make sure Magento and WordPress are installed. It is assumed that you have a working Magento site and need to install WordPress to make use of the additional features.
You need to install WordPress to a folder name "wp" (you can use any name as you like) in your Magento document root. Installing can be done using
cPanel > Softaculous/Installatronor from WordPress zip file. You can use the same database as Magento uses with some prefix wp_ by default or can use another separate database. To view the existing database details, open the file app/etc/local.xml in the document root. You need to specify the database in the next step. While installing using the zip file, you need to enter the URL as http://www.domain.com/wp/.
Now that you have installed WordPress, you need to add an extension to integrate it with Magento. You can use a free extension,
FishPig which can be downloaded from the below link.
You can install it like any other extensions using the Magento Connect Manager. Make sure that you’ve disabled the Magento Cache and Compiler to avoid any errors from
System > Tools > Compilation. Do not forget to re-enable it after the installation.
From the FishPig documentation, you can install it for Magento 1.x by extracting and merging the contents of the zip file with files in the Magento document root. For Magento 2.x, extract the files to a directory app/code/FishPig/WordPress from the document root and enabling it using the below two commands.
php bin/magento module:enable FishPig_WordPress
php bin/magento setup:upgrade
Next step is the integration by changing the settings.
For Magento 1.x, login to the Magento admin dashboard and select
System > Configuration > WordPress from the navigation. Fill out the database details in the form. If you are using the same database for Magento and WordPress, make sure you set the prefix. Enter the path to your WordPress installation. It can be either an absolute or relative path, so you can use wp (from step 1). Enter the Home URL of the blog, which will be added to your Magento base URL and will be the URL that your blog is visible on.
For Magento 2.x, login to the Magento admin dashboard and select
WordPress from the menu. The extension will figure out the details like Wordpress URL, database details, etc (if not, enter them manually), just enter the WordPress installation path in the config option (wp from step 1). You can integrate with the Magento theme.
Now that everything is set up, some WordPress settings need to be changed. Log in to the WordPress admin dashboard and select
Settings > General. You will see two fields with URLs (Installation URL www.domain.com/wp/ and Integrated URL www.domain.com/blog). Once you verify these, tap the
Save Changes button at the end of the page. You can also set a custom permalink settings from
Settings > Permalinks.
The integration is now complete and you can verify it using www.domain.com/blog and you will see your WordPress blog.