Skip to content
Podcast header in green
Ecommerce

Magento/WordPress Integration: A Tutorial

(Author's Note: Be sure to test any integration efforts on a staging or test environment before moving them to a live production site.)

Anyone who has worked with Magento knows that its blog capabilities are rather limited. Thankfully, however, the Magento community (the community of Magento developers — not the Community Version of the Magento Platform) have developed incredibly robust platform functionality enhancements, which you can access via the extensions in Magento Connect.

One such extension, created by FishPig, is the (ever so cleverly named) Magento WordPress Integration extension. This extension offers you very limited functionality for WordPress, along with the ability to automatically skin your WordPress theme to look just like your Magento theme. The one major drawback is that it's quite challenging to add and use WordPress plugins.

So what do you do if you want to access the plugins you’ve used in the past on WordPress?

Enter the MWI plugin. With it, you can use all of the WordPress plugins AND keep Magento and WordPress separate, but also have them work side by side. Unlike with FishPig's Magento WordPress Integration, however, you will have to do some style work to make your WordPress theme match your Magento theme. It's easy to do, with minimal work if you follow these steps:

(Note: these instructions were written for Magento Community Version 1.9.1.0. If you are using an older version of Community, you may not be as successful with your integration. If you DO run into issues, please feel free to contact us.)

Step 1

Download the latest version of WordPress (at the time of this writing, that was 4.2.1). While it's downloading, think through the exact path that you want for your WordPress install. The default when unzipping the file is "WordPress". However, many people opt to name the folder "blog" instead. Decide what you want and stick to it, otherwise you'll have some headaches later on.

If you use choose to name the file something other than "blog", replace "blog" with your name for the file moving forward through the instructions.

Step 2

Rename your new WordPress folder to "blog" (or whatever you're calling it) and place it in the root of your Magento instance.

Some people prefer to have Magento inside of the WordPress folder and reference all Magento pages with /shop. It's an easy thing to change, however, this tutorial was designed to have the WordPress folder inside your Magento instance. If you are placing Magento inside of WordPress, this setup may not work correctly.

Step 3

Finish the WordPress install by going to siteurl/blog/wp-admin. On this page, you will be asked for the database information that WordPress needs to create the necessary tables. Once created, set up an admin user (along with a few other things, which WordPress should prompt you through). Upon completion, log in to the WordPress admin.

Step 4

Install the MWI plugin, which you will find here and upload it through FTP or the WordPress admin.

Step 5

Once the plugin is installed, follow these instructions. If you don't follow these instructions, you will run into issues.

Once the plugin is installed, you will see a new option under Settings on the left-hand side called “Mage/Wp”. In this area, update all of the fields. The mage path is the most important. The nice thing about this plugin is that it gives you your Magento root path right away. So, all you should have to do is add “app/Mage.php”.

When you save, you will know immediately if you followed the instructions correctly. If not, the plugin will give you the exact steps needed to make it work.

Once your Mage path is correct, you can specify the theme and package you are using in Magento.

Congratulations!

Magento and WordPress are now working side by side.

Upon completion, there are a few additional things that you may be interested in doing.

1.) To Access WordPress function inside of Magento

$admin = "admin";

$uri = $_SERVER['REQUEST_URI'];

$adminCheck = strpos($uri, $admin);

$wpload = "blog/wp-load.php";

if ($adminCheck) { // You may need to load this on certain admin pages like the customer one if you are trying to sync users

} else {

require_once($wpload);

}

2.) Bring Magento blocks over to WordPress.

It's easy to move your styling and js over to WordPress by using the get_block function provided to you by the MWI Plugin. Simply call in your theme header file, and you will get access to your Magento stylesheets.

Additionally, once you have implemented this plugin, you will be able to bring WordPress's menus to Magento and show products in WordPress.

But that's a topic for another day.

More reads

Ecommerce
May Kickoff Preview
Building a High-Performance Ad Ecosystem for Growth
Appearance
Club E's 'Marketing Transformed: Strategies for the Digital Age'
Club E | Brimacomb Present: Marketing Transformed: Strategies for the Digital Age
Appearance
Linnworks 'Game Changing AI Strategies for Merchants' Preview
Game-Changing AI: Must Impliment Strategies for Every Retailer Guest Podcast
Ecommerce
Feed Optimization Preview
How Feed Optimization Powers Organic Growth and SEO Strategies
Appearance
Emplifi Podcast on Agency AI Growth Preview Image
AI Powered Agency Growth with Emplifi
Go forth and read

More from Ecommerce...

May Kickoff Preview
Ecommerce
Building a High-Performance Ad Ecosystem for Growth

As Q2 heats up, so does the competition. That’s why this month’s focus is all about a critical driver of ecommerce success: __paid media__. Running high-performing advertising campaigns isn’t just about pumping dollars into ad accounts—it’s about building a smart, scalable, and efficient digital ad ecosystem from the ground up.

Feed Optimization Preview
Ecommerce
How Feed Optimization Powers Organic Growth and SEO Strategies

For ecommerce businesses, success in digital marketing isn’t just about having a well-designed website or strong ad campaigns—it’s also about how effectively product data feeds are managed. Feed optimization is a crucial factor in driving organic traffic, improving visibility, and enhancing the customer experience across multiple sales channels.

AI + SEO Preview
Ecommerce
The Role of AI in SEO: How to Optimize Content with Precision

In today's digital landscape, search engine optimization (SEO) has moved far beyond simple keyword targeting. AI-driven tools are now essential for optimizing content with precision, enhancing search rankings, and improving the overall user experience.