If you’ve been managing your own website for anytime, at some point you’ve probably thought, “How can I monetize my site?” Lot’s of people make money on the net. Some do it through advertising, some through multi-level marketing, but for me as an author, there’s nothing more satisfying than when someone buys my books. I sell books…my books. And I sell them from my own self-hosted, self-developed websites.
I currently have six websites. Four are mine, one is my wife’s and one is my daughter’s. They are all hosted in WordPress 3.x on my own server. Last night I was up until almost 3:30am working on my latest site that will shortly be open to the public. That site is dedicated to my book “Principles for Maturing Your System Development Life Cycle: The Ultimate Guide to the SDLC,” ISBN: 978-0-615-42677-8. The target demographic is anyone in Information Technology. I’ve been in IT for over 25 years and if there’s one thing I learned, IT people want to keep things simple, efficient and they want to have opportunities to develop supplemental income streams.
I gave this a lot of thought when I was designing the site and decided to not only have the mandatory shopping cart for immediate sales and downloads, but to offer an affiliate management system so I can track and pay commissions to others for helping sell the book. Since I’m using WordPress I figured that someone, somewhere already wrote a plugin that would have the functionality I wanted. I was right! The plugin I found is available from Tips & Tricks HQ. They sell premium WordPress plugins for eStore, Affiliate Platform, Membership and even one called PDF stamper. The PDF stamper safeguards your digital PDF assets by stamping the purchaser’s information on the bottom of each page and securing the file with the purchaser’s email address as a password.
As do most of us in IT, I almost never read the manuals. The Affiliate plugin set up like a dream. It took no more than 10-15 minutes to get operational. PDF Stamper also set up easily. However, when it came to the eStore plugin, that’s where I ran into trouble. It was no problem adding products and getting the “Buy Now” and “Add to Cart” buttons to appear. The shopping cart worked well. In all it took about 15 minutes to set up. The problem I had was when I tried to check out. I kept receiving the following error: “Either your shopping cart is empty or the PHP Session on your server is not working correctly." The error occurred in both IE8 and Firefox 3.6.12. So now the troubleshooting begins.
First, I followed the directions from the troubleshooting guide at the Tips & Tricks HQ website as well as checking PHPInfo() to make certain sessions are turned on. They are turned on and they are working fine. The next suggestion to look at is “Your site URL and WordPress blog URL are not specified the same in the General settings of WordPress.”
This is where I found and fixed the problem. This fix only applies to WordPress 3.x and higher. It has to do with how the newest versions of WordPress manage multiple sites. I said earlier, I have six websites. Each has their own domain name and they are all operational on one server. They all share a single IP address, yet they each have their own WordPress theme and functionality varies from site-to-site. From a site perspective, only my master domain is active. All the other domains are parked. WordPress handles all of the domain management details through the domain mapping plugin.
When I first turned on the multi-site features of WordPress 3.x, I was given no choice but to use subdomains for additional sites. I don’t like using subdomains. This is my personal opinion, but I don’t believe they give the same professional appearance as individual domains. I prefer the WordPress subdirectory set up mapped to domains. So I changed the way WordPress establishes new sites on the back end and made the requisite modifications to my .htaccess file. Now when I create a new site, WordPress creates it as <My_Master_Domain>/<subdirectory>/. The subdirectory doesn’t really exist on the server. It is virtual managed by WordPress. The domain mapping plugin works hand-in-hand with Apache rewrite to point this virtual subdirectory to the real domain name.
The fix for the eStore plugin was quite simple once I realized what was going on with the name mapping. I entered the Super Admin menu and edited the book site from there. Everywhere WordPress had written <My_Master_Domain>/<subdirectory>/, I changed to <My_Book_Domain>/. Everything functioned perfectly afterwards.