In integrating a WordPress log in with Magento, there are things we need to consider like 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. Therefore, regularly updating content or adding new ones is one of the best ways to increase the SEO ranking. Also, 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. Moreover, Magento does not have a builtin system for blogging but can be easily be integrated with WordPress, combining both of their features.
Below are the steps you will have to follow to integrate WordPress with your Magento store.
Step 1: Installing WordPress.
Firstly, you need 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/Installatron or 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/.
Step 2: Installing Extension.
Additionally, 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 also 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
Step 3: Integrating WordPress
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. Finally, 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.
Thus, 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.
Step 4: Changing WordPress settings.
Finally, 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). Then, 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.