WordPress is an extremely powerful and widely used open-source blogging platform. It has a wide community of developers and users, and almost all kinds of plugins are available for it. Although there are some shopping cart plugins for WordPress, they are not full-blown shopping carts like Zen Cart or osCommerce. E-commerce plug-ins available for WordPress have limited features.
Those who are running blogs using WordPress may want to integrate it with Zen Cart to provide e-commerce functionality to their blogs. In fact, there is a Zen Cart module for integrating these two. You can download that module from www.zen-cart.com.
After downloading the plug-in WordPress on Zen Cart, you have to install it on the webserver. You can install the plug-in in two ways: first, in an environment where you have a working WordPress installation, and second, when you have not installed WordPress.
WordPress and Zen Cart Installed in Separate Directories
When you have an existing installation of WordPress, generally it will be in a separate directory from that of the Zen Cart installation. If your web document root directory is public_html, then the installation directories may be: /public_html/blog and /public_html/shop. Follow these procedures to install WordPress on Zen Cart plug-in:
Step1: Install WordPress
If you have not installed WordPress yet, then download the WordPress files from www.wordpress.org and unzip the files. Then, upload the files to your webserver’s /public_html/blog directory. Now, change the permission of this directory to 777 and point your browser to http://yourdomain.com/blog/wp-admin/setup-config.php. The installation wizard for WordPress will be displayed. Follow the instructions on the wizard and give the necessary information. Once all of the information is given, WordPress will be installed.
Step 2: Configure WordPress
During installation, an administrative account will be created. Note the username and password for this account. Then, point your browser to http://yourdomain.com/blog/wp-admin/. The login page will be displayed. Type the username and password for the administrative account and click on the Login button.
You will see the dashboard for administering WordPress. Go to Options | General. Now, change the Blog Address (URL) to Zen Cart’s URL http://yourdomain.com/shop/. From the administration dashboard, go to Presentation | Themes and select WordPress Default 1.6.
Step 3: Upload WordPress on Zen Cart
When you unzip the WordPress on Zen Cart plug-in zip file, you will find that there is a directory called ZC_ROOT and WP_ROOT. Now, upload the contents of ZC_ROOT directory to Zen Cart’s installation path on the server, that is, /public_html/shop/. Similarly, upload the contents of the WP_ROOT directory to WordPress’ installation path, that is, /public_html/blog. Before uploading the contents of the ZC_ROOT directory, please change the name of the /ZC_ROOT/includes/templates/MY_TEMP/ directory to that of the template directory you are using for your Zen Cart shop
Step 4: Edit WordPress File
For older versions of WordPress, you may need to edit the /wp-include/template-loader.php file. Open the file in a text editor and replace all exit; with return;. However, you may not need this for the newer versions of WordPress. WordPress 2.3.1 can work without this modification. First, try without this modification.
Step 5: Edit Zen Cart File
You also need to edit another file in the Zen Cart installation. Open the /includes/extra_configures/wordpress-config.php file under the Zen Cart installation folder and find the following line:
define ('ABSPATH','/var/www/vhost/example.com/public_html/blog/');
Type the appropriate WordPress path, that is, /home/username/public_html/blog/. The above line will look like this:
define ('ABSPATH','/home/suhreed/public_html/blog/');
If you are trying it on Windows, you may need to put the absolute path, as in, e:/www/blog.
Step 6: Configure Sideboxes from Layout Boxes Controller
Once the file modifications have been done, login to the Zen Cart administration panel. Go to Tools | Layout Boxes Controller. The screen will notify you that some new sideboxes-wp_cats.php, wp_archives.php, wp_pages.php, wp_links.php, and wp_sidebar.php-have been found. To use these sidebars, click on the reset button at the bottom. To show these sideboxes on your Zen Cart shop, click on the sidebar and change its left/right column status.
Step 7: Test your Integration
Now, it’s your time to see how the Zen Cart and WordPress integration works. Point your browser to your Zen Cart shop, that is, http://yourdomain.com/shop/. If everything is okay, you will find the screen as shown in the following screenshot:
If the ABSPATH value in wordpress-config.php file is not entered appropriately, you will get a message saying that wp-config.php file in a particular path is not found. In that case, edit the wordpress-config.php file and enter the correct path to the WordPress installation.
Note that a left sidebox named Blog Sidebar is shown in your Zen Cart shop. You will find links to pages in the blog, links to archives, and links to categories. Click on a link and that category, archive or page will be displayed.
You may be disappointed when you look at the result because the whole WordPress page with headers, footers, and sidebars is displayed. If you have some knowledge of customizing WordPress themes, you can work out a nice solution by removing the header, the footer, and the sidebar from the theme layout.
For learning WordPress theming, check the excellent tutorials at www.wordpress.org. You can also read WordPress Themes, published by Packt.

WordPress and Zen Cart Installed in the Same Directory
You can also install WordPress and Zen Cart in the same directory. In such a case, install Zen Cart first. Configure it for normal use, and then proceed with the installation of WordPress. For example, if your Zen Cart installation is in /public_html/shop/, then WordPress will also be installed at /public_html/shop/. First, download the WordPress installation package, unzip it, and upload all files, except index.php.
After uploading the files to the Zen Cart directory, i.e. /public_html/blog/, change the access permission of these to 777. Now, point your browser to http://yourdomain.com/shop/wp-admin/setup-config.php. The installation wizard for WordPress will be displayed. Follow the instructions of the wizard and provide the necessary information. Once all information is made available, WordPress will be installed.
Now, follow Steps 2 to 7 as described in the previous section. In this case, the paths to Zen Cart and WordPress will be same.
When you use other themes, it is necessary to revise the header of the WordPress theme, a footer, a sidebar, and a style sheet.

Hey…thanks for all the info. I believe I have successfully integrated my store and blog. However, when I click on the “more” link next to “blog sidebar” I get this message:
“Warning: Cannot modify header information – headers already sent by…”
at that point it lists my ABSPATH and some other info and I have no idea what this means. My blog and blog posts show up though…
Hey Nathan, look at some of the include files, two files are being included that are both sending out headers on that “more” page. If you get stumped, you can start commenting out included files and seeing if the message changes, once it does, you’ve located the file with the issue… Good luck
This is the exact message…
Warning: Cannot modify header information – headers already sent by (output started at /home/”username”/public_html/”website”/includes/templates/template_default/common/html_header.php:22) in /home/”username”/public_html/”website”/blog/wp-includes/pluggable.php on line 850
On line 850 in pluggable.php it says:
“header(”Location: $location”);”
But I’m not even really sure if it’s telling me that is the problem. I’m knew to this so I really don’t know where to start. I’m going to continue to research my problem, but any help you can give would be appreciated. Thanks.
By the way…I have checked for blank lines on the pluggable.php and wordpress-config.php
Nathan I think you’ll find the problem is that Wordpress is doing it’s redirect after zencart has already started rendering the template.
I did a print statement on the redirect and found the error occurs when wordpress tries to complete the following redirect.
/index.php?main_page=wordpress
/?main_page=wordpress
To get around the problem always use the formatting of the second line whenever you want to render the wordpress home page on your site.
Hope that helps.
Excellent article. Directions much clearer than what came with the plug-in.
Im having trouble with step 3
I can’t find ZC_ROOT and WP_ROOT
I have installed wordpress in /blog and zencart in /shop and done step 1 and 2
can you help???
thanks for the guide. i’ve been looking for a way to get more ecommerce functionality out of the wordpress platform and have dabbled with a few things. i can’t wait to try out zen cart.
I’m trying this integration out and I’m getting this error:
Cannot modify header information – headers already sent by (output started at /home/tehans/zenwp.tehans.com/shop/includes/templates/template_default/common/tpl_box_default_left.php:21) in /home/tehans/zenwp.tehans.com/blog/wp-includes/pluggable.php on line 865
Is there a fix for it?
I’ve got everything installed, but when I click a wordpress post or page from the blog sidebar, it loads with a zen cart address, but the page does not load inside the zen cart template at all. Any ideas on this?
@John – For the "Cannot modify header information – headers already sent by" error, try this post (from the WOZ support thread)
http://www.zen-cart.com/forum/showpost.php?p=678810&postcount=565
Should do the trick…
@Adam – If you are using ver 1.4 of the WOZ module, you should roll back to ver 1.3 of the WOZ module. Make sure you COMPLETELY REMOVE all ver1.4 files.
Ver 1.4 of WOZ has been found to be buggy. With little to no support from Hira (the author of this mod), there is no solution to the issues found.
I am stuck on the [ZC_ROOT/includes/extra_configures/wordpress-config.php]
I changed everything to define (’ABSPATH’,’[Physical Path To WordPress]‘); with my physical path to wordpress, but it still comes out as, "Error:ABSPATH is not set adequately.
Please set ABSPATH in includes/extra_configures/wordpress-config.php."
My path is /test/wordpress/
I’m having a similar problem – in that the breadcrumbs show up but the actual pages are blank. Has anyone had this problem, and how have you solved it?
After reading the installation instructions I can’t seem to find WordPress on Zen Cart nor the ZC_ROOT and WP_ROOT folders in anything related to wp and zen cart which I have downloaded and unzipped. 1)what is the name of the zip file for WordPress on Zen Cart and where do you find it 2) I did find a"wordpress Zen integration _page.zip". How does this fit in the picture? 3)I am using wp 2.9.1 and zen cart 1.3.8a. I have set up and configured wordpress in the "blog" folder and intend to use the theme atuahalpa, which has a lot of nice options and configurations, unless there is some conflict. I am presently attempting to install "zen-cart-1.3.8a-full-fileset-12112007" into the "public_html/shop" directory. How can I get these things to work together since I don’t have the files/folders mentioned in the install?
Can you expound a little on your answer to Nathan? I am getting the same issue:
Warning: Cannot modify header information – headers already sent by (output started at /home/xxx/public_html/maggielakewoodworks/includes/templates/template_default/common/html_header.php:22) in /home/xxx/public_html/maggielakewoodworks/wp-includes/pluggable.php on line 868
Also, when I click on any of the links in the sidebox I get a 404 error.
@Merrill – See step 1 of the instructions posted here: "download the WordPress files from http://www.wordpress.org and unzip the files"
@EVERYONE who is having the "Warning: Cannot modify header information – headers already sent by" error. I posted this previously… Let me post again.. IF you are using WordPress on Zen Cart ver 1.3, you need to implement "Kiddo’s Fix" as per the instructions here: http://www.zen-cart.com/forum/showpost.php?p=678810&postcount=565
IF you are using WordPress on Zen Cart ver 1.4, AND you downloaded it from the Zen Cart downloads section (versus downloading it from Hira’s site), you will need to make a small correction to one file. See: http://www.zen-cart.com/forum/showpost.php?p=846242&postcount=1301