Over the last few days I started digging into how to optimize my VPS and WP Blog for speed.
I am normally a MS guy, I have been supporting MS Windows and IIS at work for more then 10 years. Optimizing the OS and IIS for speed comes pretty easily, on Windows. I don’t have a lot of experience with Linux. So I started out by trying to map the different components.
OS – Linux Kernel
Apache
PHP
WP
MySQL
For the OS I am running the hosting providers default install of CentOS, with Virtualmin\Webmin installed for management. I have all ready followed several different guides on locking it down via firewall, removing unneeded virtualmin\webmin modules, etc.. So I figured the OS was all ready somewhat optimized. (I know, not really and I do need to re-visit this someday.)
For Apache I started digging around and found several great guides. In the end I followed advice from a few different places. Namely I followed this site.
The only issue I had is when trying to restart Apache I had several errors regarding missing modules. I just went through and re-enabled the modules one at a time as they gave errors. It turns out that the default install of Cent-OS and Virtualmin\Webmin required some additional modules above and beyond those that the article suggested.
Beyond that I had gone through several other forums and guides, etc. regarding what values to actually use for the MPM prefork module. I ended just playing with it. Since my site does not get a lot of visitors or hits I tweaked the settings to attempt to use as little resources as possible, but would still serve my homepage fast enough for my liking after restarting the Apache service. I played with both, restarting the Apache service and letting the server sit idle for a few minutes between visits. I can not remember what settings I ended up with, but I think I ended up close to the suggested ones in the guide.
Next came PHP. I could not find any good guides on optimizing PHP. There were several that pointed back to a guide that they claimed showed how to optimize PHP but really it discussed the same MPM settings in Apache and talked in detail about how PHP and Apache work together, but gave no real guides or points to actually optimizing PHP itself. In the end about all I could do is fine opcode cache services. I found three, eAccelerator, XCache, and Zen. After looking at several different comparisons (I would link to them, but I spent hours scouring through google and I doubt if I really could go back now and find them all, besides it would be a ton of links.) For WP it seemed that eAccelerator performed slightly better, so I ended up installing it, per the instructions found here.
Now for WP. I had tried several different plugins. PHP Speedy, and several other WP cache plugins, as well as an eAccelerator plugin. I could not get the eAccelerator plugin to see that eAccelerator was in fact installed, so it kept wanting to just run normal WP Caching. I double, and triple checked my eAccelerator config, and just could not get it, so I removed the plugin. I ended up removing PHP Speedy too. I finally came upon the WP SuperCache plugin. The only thing I have not fixed yet is the Random Picture Widget on my Sidebar. The SuperCache plugin caches complete pages. I tried adding their trick about setting a certain variable name to true in order to not cache the page. I added this line in the php file for the widget, but it caused the whole page to not be cached. Since this widget appears on every page it defeated the whole purpose of caching. I am now looking into something I saw the other night (but was too late to mess with) regarding modifying the the code to add additional scripts or something to get the SuperCache plugin to not cache it. (I am not sure, at that point I may have been hallucinating…)
For WP I also went through and downloaded all of my pictures and images used, ran them through Yahoo’s SmushIt and then re-uploaded them. I then installed this plugin WP Smush.it, hoping that for now on all of my images will be successfully smushed.
Then on to MySQL. I dug and dug and dug. I found so many contradictory guides on how to optimize MySQL that I gave up. One would say do this, then another would say don’t ever do that… Then another would be totally different. In the end I did find one thing that helped. I disabled InnoDB. This cut a huge amount of resources being used by MySQL. Since this VPS will only ever host (as far as I know) this WP blog, and maybe a WPMU or Joomla site on another Apache Virtual Server, I don’t need it.
Overall I learned more then I wanted to about Apache, PHP, WP, and MySQL. But in the end my site loads a good 10x faster, and I have cut the memory utilization of my VPS (at idle) down from 400MB of RAM down to around 220MB.
So, the site is back up, it is faster then ever, but for now if you want a new set of random pics on the right, wait 6 minutes and refresh (Chances are you are the only one looking anyway…)
Ok… So I downloaded a new app on my Pre that should let me update my Blog.
So far so good. It can log in, and pull down my entries. Now lets see if it can submit entries.
And with pictures too.. Just some random pictures of Joshua’s soccer cone spiders that he made after a practice:
BTW, it is called Poster. It is in the App Catalog, and here is their site.
Imagine that… I am actually updating again.
Well, I think the other project, cooptree.com is dead for now.
I have not heard from the developer since before Thanksgiving, it is like he fell off the face of the planet. Looking over the forums at TNG it looks like the Joomla plugin developers have made some headway. It almost has all of the issues resolved that I wanted to have working. If they keep going I may just implement it here and forget about WPMU for cooptree.com.
As far as localhub.com goes, I am guessing this is about it. I like the theme, so I will live with it’s shortcomings. No new Smugmug plugins, so I will live with that for now. I have added Google Ads. I guess about the next thing I will do is continue to post updates, and start adding categories and content… imagine that, my site with actual content. I don’t know if I can handle that.
So the first new Category is going to be Family. We’ll see how that goes…
Few steps forward… few steps back.
Let’s review, list from a while back \ and updates:
1.) Get a decent theme for WP.
Done. I thought. I found a cool theme. Installed it… tweaked the mess out of it… and I like it… but… according to here it sucks. So, I may be looking for a new one soon. I think I am going to live with this one for now, and move on. I will re-visit this after the rest is done.
2.) Customize the theme with my localhub branding…
Done.
3.) Integrate WP and my smugmug site using widgets and plugins available.
Done. To the best that I can for now. I am using WP-Smugmug and SmugWP. One of them lets me embed images into my sidebar. Which I tweaked to cache the large images locally with the thumbnails, and the thumbnails now link to the locally cached large image instead of the image in Smugmug. This helps me keep my smugmug site a SmugIsland.
4.) Tag all 4,000+ of my photos in smugmug with keywords so they can be searched.
Well.. I started… I have finished about 1/10 of them.
5.) Start harassing my developer to finish my other project in the works, cooptree.com
Done. For now. He states he will start\finish the week of Thanksgiving.
So, for the two of you who are actually somewhat skimming my blog, how am I doing? let me know…
Well…
It has been a long time in the works. Several years, but I have never really been good at keeping a blog.
My Gallery site is finally up and running, and is no longer hosted by me. It is now on Smugmug. I have played and toyed and tweaked, and I think I am done. So, for now here is what I need to do:
1.) Get a decent theme for WP.
2.) Customize the theme with my localhub branding…
3.) Integrate WP and my smugmug site using widgets and plugins available.
4.) Tag all 4,000+ of my photos in smugmug with keywords so they can be searched.
5.) Start harassing my developer to finish my other project in the works, cooptree.com
So… it is finally starting to get there. My sad web presence is almost complete.
Ok… here we go again.
Moved from Omnis hosting to TMDHosting because Omnis’ idea of unlimited is restricted to average user.
TMDHosting decides to change their TOS 45 days after I signed up, to place gallery sites in violation, and to limit their definition of unlimited to average user. Their sales team assured me, prior to signing up, that gallery sites were ok, and unlimited was only defined by their 175000 max inode limit. Well… I guess that is my fault for not watching the TOS like a hawk and knowing ahead of time that they would change it (as their tech support pointed out to me, “it is in the TOS that you have to monitor it.” So they refuse to refund anything as according to their TOS I was past my 30 day refund period.
So… I am now moving the photo gallery to Smugmug… and I have moved off to a VPS for hosting.
So, we will see how long this lasts.






