Live your Dream today !

Welcome To Wahm Cafe! If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!


Optimize Wordpress

Optimize Wordpress

Wow .. that was scary!  Wahm Cafe was down for 2 days before I finally found the solution!  All you probably would have seen was a blank page when you arrived here, which was bad enough, but then to have my hosting company tell me that my .htaccess file had been changed yesterday had me thinking “HACKER”.  Sure enough, when I checked out my .htaccess file, it was totally blank .. so I started there by replacing that .. and got absoutley no where.

Then, when I tried to log into my wp-admin, I saw a notice that my database was out of date and needed to be updated.  I couldn’t see that as being a possibility, but I clicked on upgrade anyway and it returned a whole lot of errors .. they key to it being the phrase “MySQL server has gone away”.

It wasn’t until @sparxmind replied to one of my posts on Twitter yesterday that I figured out obviously more people than just me have gone through this.  So, I dug a little deeper playing around with searches on Google until I hit upon the right search phrase.  Turns out I was correct in my thinking that I wasn’t alone.  Thankfully, there was a workaround for this issue .. apparently it may have something to do with all the calls to the database and the database time out length.  I’ll be delving into my plugins today to see what I can get rid of, as I’m a bit compulsive when it comes to wordpress plugins LOL.

For those of you who have received the Wordpress error message “WordPress database error: [MySQL server has gone away]”, I made a change to a Wordpress PHP file that makes it so you will probably never get this error again.

A huge thank you to Rob at Rob’s Notebook for creating the fix to this issue, and getting my blog back up and running :))

Now that I’m back up and running, I decided to take a look at some of the issues that I have encountered with WordPress, in the hopes of increasing page load times and just generally make everything function better.

Here are a few of the tips and tricks that I’ve come across that I’ll be implementing:

1.  Optimize my database tables for optimum performance.

There are a few ways of handling this, such as manually going through your phpmyadmin (or similar program) to work on your database, but for WordPress, there’s a plugin that will allow you to do everything:

Manages your Wordpress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.

Check out WP-Database Manager for more information and to download this plugin.

2.  Cache my blog

A cache is a temporary storage area where frequently accessed data can be stored for rapid access, instead of having to pull the content from the database each and every time it’s required (ie:  when you visit a web page).

WP Super Cache is a static caching plugin for WordPress. It generates html files that are served directly by Apache without processing comparatively heavy PHP scripts. By using this plugin you will speed up your WordPress blog significantly.

More information on the WP Super Cache plugin can be found on the authors blog:  Holy Schmoly

3.  How many plugins are too many?

It’s almost embarrasing to say that I’m running approximately 30 different plugins here on Wahm Cafe, and I’m planning to add the WP Database Manager and the WP Super Cache plugins in addition to those.  If your blog is running well, with fast page load times, chances are you have nothing to worry about.  However if your site load time’s seem slow, then have a look at the plugins you have installed .. there is a good chance that one or more could be causing the problem.

The general consensus is to have as few plugins as possible in order to run your blog the way you want it to run .. but with all those nifty plugins out there, who can limit it to just 5 or 6? lol.  I certainly can’t, and have no intentions of dropping that many of my plugins, however I will go through them and make a decision about each and every one.  I’m hoping to be able to drop 10 at least.

The other thing I’ll be doing is browsing through new plugins to see if there are any that have combined forces .. so that 1 plugin will replace 2 that I’m currently using.  It’s a good idea to re-evaluate your plugins after every major WordPress release as well.  WordPress often builds in new features that replace the functions of current plugins.  Just something to keep in mind ;)



Reblog this post [with Zemanta]





Spread The Word:
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • Facebook
  • Google Bookmarks
  • Reddit
  • email
  • FriendFeed
  • LinkedIn
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
Similar Posts:

8 Responses to “Wordpress – MySQL server has gone away”

  • Glad I could be of some help. :)
    As far as caching goes, I just use the built in cache, and it seems to do the trick. I’ve used wp-supercache on a few blogs that I’ve set up, and it always seems to make things a bit… wonky. And it only seems to do that on blogs that I’m hosting (which means I’ve got someone that’s not computer literate in the first place trying to figure out why a page that they’ve just changed isn’t updating.)

    My current setup – supercache is on the server but disabled. It gets turned on when I notice a huge traffic spike from digg, stumbleupon, etc.

    sparxs last blog post..62 Degrees

  • Hi Sparx.. yeah, the more I got into checking out the WP Super Cache plugin, the more I thought that it’s definitely not for the faint of heart lol. Good plan about turning it off and on as required :))

  • Hey Dianne, I’m right behind you with 22 plugins on one of my blogs.LOL. Just wondering what the plugin is for the “retweet” thing at the top of your posts? I’m seeing that on a lot of blogs now.

    Cathy Bendzunass last blog post..I Can’t Help It, I LOVE Sci-Fi

  • Hi Cathy :)) I started seeing the retweet thingy on a lot of blogs too, and took me a little bit to find it lol. Here’s the link: http://wordpress.org/extend/plugins/tweetmeme/

  • Thanks so much! I just installed that plug in on all my blogs. Love it!

    Cathy Bendzunass last blog post..I Can’t Help It, I LOVE Sci-Fi

  • Diane, I had a similar problem with my Old thyme Goodness site, my .htaccess was messed up had to reload my site from a backup

    Mary Ellen

  • I was thinking of going for “WP Super Cache” plugin…but was pushing it…I think i`ll install it rite now…

    ComputeLives last blog post..Install Ubuntu on Windows With Wubi

  • I had a wonky mysql problem about a week ago… not sure what it was, but a database repair fixed it. It was causing all pages to time out (with no output, just blank pages) and shot my server’s memory usage up to 100%.

    Also, it doesn’t look like your commentluv plugin is fully functional. Mousing over the heart returns a 404 error for a script hosted on commentluv.com… are you using the latest version of the plugin?

Leave a Reply

CommentLuv Enabled

Sponsors
Advertising Available!
Blog Of The Day
Categories
Join Us On Facebook!
Wahm Cafe on Facebook
Friend Connect