WordPress For The Enterprise – Article 3

Dealing With Potential Problems During Implementation

After the first two articles about WordPress for the enterprise, Article 1 and Article 2, I am writing this third articles about some of the nuances of the process of converting an old home grown CMS based site to WordPress for the Enterprise. There are and always will be some hiccups along the way. So let’s get into what happened.

WordPress on Load Balanced Servers

Our company deployed WordPress on load balanced servers, so how did we do it. It was supposed to be pretty easy to do, and if your site is configured properly, basically all you do is:

1. MySQL On A Separate Server
Make sure the WordPress MySQL database is located preferably on a separate server, not localhost, or if you are not that sophisticated on one of the two boxes.

2. Firewall Rules
Make sure that there are no firewall rules in place that would hinder the servers accessing MySQL remotely. We had to have firewall rules allowing communications placed between the production servers and the database server.

3. Location of MySQL Server
Also, we made sure the MySQL server is located within the same data center. If your database server is in Houston and your application (WordPress) servers are in Boston, it will be as slow as molasses…

4. Pre-Loading MySQL
Instead of loading MySQL from the initialization process that WordPress automatically uses, we sync’d the QA MySQL with the production DB. This allows us to have an instant production server, and just be able to make an adjustment to the WordPress config files.

5. Third Level Domain Names
Hopefully you will have an SA to help you if you are using load balancing. Very specifically we set up a unique domain (third level TLD) for each production server. For instance if you are Danspetloversparadise.com, you would set up server1.danspetloversparadise.com and server2.danspetloversparadise.com, and test both servers individually. I will get to that in a moment. In addition, in our case, we had an existing production server, with the name of the final site on the production server. Sounds confusing, and if you have questions, just login to this site and ask them. So in this case, you would want to create a new.danspetloverspardise.com, in order to test out the site before going into production. Sounds like a lot of extra third level domain names and work, but that is what it takes to do it right in the enterprise environment.

6. Webserver (Apache) Configuration
So on both servers, you would need to configure one of the third level domains and new.danspetloversparadise.com. Turns out we had some major issues with our apache configuration, and we had to use the SAs to take a look at the Linux based apache config, httpd.conf. Now, I am assuming you are Unix based or Linux based, but this could be an issue for Windows users as well.

7. Server Testing and wp-config.php
Once the sites all showed up, we are ready to go through a series of tests using wp-config.php. Set both wp-config.php files on both server1 and server2 to point to the proper DB, Host, user and password. The conundrum of WordPress in the Load Balancer, is you have to set the database to one site name at a time to do the testing. So here is the sequence:

8. First Test server 1
This would be server1.danspetloversparadise.com as an example. This requires adjusting 2 options in the Database manually under wp_options, site_url and home options. I use phpmyadmin for this. If you have it and know it, use it. The reason I recommend switching this directly in MySQL is it is possible when you go to save the WordPress options in the WordPress settings area, it will reset and push you to the wrong site… So change the site_url and home options to server1.danspetloversparadise.com and then go to server1.danspetloversparadise.com and see if the site shows up. To finish off this test, login to wordpress, and using the Velvet Blues URL manager I recommend in Article 2, swap the QA url for server1.danspetloversparadise.com… And see if it works and you can get around the server1 site without a problem. If it works, time to test server 2.

9. Second Test server 2
Swap the site_url and home options in MySQL wp_options to server2.danspetloversparadise.com, then go and and using Velvet Blues URL manager swap server2.danspetloversparadise.com with server1.danspetloversparadise.com. Then test the site as server2.danspetloversparadise.com. If it works good, it is time to test the new.danspetloversparadise.com.

10. Load Balancer Test
Swap the site_url and home options in MySQL wp_options to new.danspetloversparadise.com, and then go and using Velvet Blues URL manager swap server2.danspetloversparadise.com with new.danspetloversparadise.com. Test the site as new.danspetloversparadise.com. You should now be ready to swap the site over.

11. Using Redirection, the program I mention in Article 2, to test out all the old links on Google, Bing and Yahoo before doing the swap. This will take a while and it is critical in not losing old urls that will get zapped in a site migration, if you have a previous none WordPress site.

Next article will cover post migration for WordPress Enterprise users.

WordPress For The Enterprise – Article 2

WordPress Enterprise Issue And Plugins

Now that you have read my first article,WordPress For The Enterprise – Article 1, which is really more about reasons why to do a WordPress enterprise implementation, let’s get into what is missing; how we are dealing with it; the absolutely necessary plugins that are out there and the big issues. Here is the big issue and the Plugins I recommend (I am sure there are more out there, and I promise to update this blog with them):

DEV vs. QA vs. PROD
The first and foremost problem with not having an enterprise based solution in WordPress is resolving the enterprise issue of building in a dev environment, testing and QA’ing content in a QA environment, and finally publishing into a secure environment. A lot of gaps here and probably good enough reasons for many IT execs to back off and go for Interwoven, a customized CMS or some other relic of the past. But like I have been saying in Article 1, you have to take the good with the bad, and go with this train, because it is moving so fast, solving so many SEO and other issues along the way, that what the heck, let’s go for it. For now, the answer is still not simple. Across a dozen WordPress implementations, we are currently syncing the Databases. Now that may be a silly answer… albeit let’s get to the real answer. And like all web developers, if there is a problem, there is a solution. That is why have been developing an in-house Enterprise Publishing solution. It is still under development, and it will fit right into the WordPress admin system. When a writer is ready to sync a page from QA to Prod, and it has been approved, there will be a checkbox next to each page, and when they are ready to go, walla, the system will push the content from mysql DB QA to mysql DB PROD… Once we are done with this solution, there probably will be 10 or so plugins just like it on the market. This is coming. Maybe you will be using ours one day.

Anyway, that was the tough news to hear… Now here are the plugins that we can not live without:

Redirection
This plugin is like the old .htaccess in the linux environment that sets the redirects of incoming links, without having to create directories or redirection files. Found this one a while back and it has really improved our migration from non-WordPress sites to WordPress. If you are not familiar with this one. I would take a look. You may not be ssh’ing to the box after you find this to fix your URLs.

Velvet Blues Update URLS
Sounds kind of funky and kind of important. This small utility plugin simply allows you to flip all URLs in the site, including all content pages, from one URL to another. Now, why would you need this. It’s simple. You want to create a temporary site on the production box before you go live. Let’s say your site is called StrategicPoints.com. So before I go live I want to see it as as WordPress site and not mess up the current site. So I create a new.StrategicPoints.com. Let’s say the Mysql DB is coming from the QA site, qa.strategicpoints.com. So you go into Velvet Blues and flip qa.strategicpoints.com to new.strategicpoints.com. (Just a comment that if you do this, you still need to get into the MYSQL db to swap the DB options first before you run this. I recommend PHPMYADMIN for the faint of heart out there, who were not an SA like me in the old Bell days). I will get more into the production migration process in my next article, so we will get back to this process later on.

Exec-PHP
This is a very simple plugin which allows you to drop PHP code into the content area on any page. Sounds like a silly thing, but this could be important in making your widgets and making dynamic things happen in your code.

Breadcrumb-navxt
A plugin that allows you to show your bread crumbs as you surf around a WordPress website.

PagesPlus and My Page Order
Plugins that allows you to manage a large amount of pages better. I have not yet used these yet, so I won’t comment, but if you are dealing with over 100 pages of content, this could be important.

Ax-sidebar
This allows you to better manage the side bar content

All-in-one-seo-pack
A variety of SEO related tools, and seems to be the best one for the enterprise. There are many of these WordPress SEO tools out there, but this one appears to cover most of the needs of SEO.

Google-analytics-for-WordPress
This is one of several Google Analytics installer plugins. This one seems to work. I have tried a few, and this one is ready to go. If you are new to Google Analytics, well you should know the drill by now. Put Google Analytics on the site and you will know the anlaytics

Googe-sitemap-generator
Great tool for generating a sitemap.xml file for Google Webmaster Tools. If you have not logged into this part of Google yet, you really need to, because it is the best way of letting Google know what pages you offer. Great for SEO.

Sitemap Generator
Not to be confused with the sitemap.xml file, the Site Map generator creates a real site map that real users can use. Sounds Great!

WP Security Scan
This is a great security, WordPress, hardening tool. Use it to run a site audit and see what needs to be improved. Keep up with new versions, through the new downloader, and you will keep from getting hacked, always an issue using this open source stuff, and an enterprise concern

qTranslate
Just getting into the localization, then try the best of WordPress breed out there. This is qTranslate. I have used it once so far and it did the job. I will mention however, that it is powerful and does require set up. There are these .mo files that need to go on your site in order to assist with the translation character set. So this one may require talking to a tech guy. For latin languages, it goes right to work. Anyway, we are about to try it out again for a new site and we will see if it is up to the Enterprise task.

That’s about it for now. Hopefully we can come to some conclusion on a set of enterprise plugins. The big one, the “Publishing Plugin” is getting close at our company. Somebody will create a real nice one out there and hopefully solve this issue. There are a variety of problems and issues associated with this production plugin, but I think they will be worked out, to the point that we just point and click and it does the job.

Next, Article 3, the WordPress enterprise migration process.

Previous Article 1, WordPress For The Enterprise – Article 1
Next Article 3, Click Here to go to Article 3, Problems During Implementation

Dan