Wordpress Tips You Really Should Know, Part II: Speeding Up Your Blog

Posted: February 8th, 2010

Photo by Foreverdigital (Flickr)

Photo by Foreverdigital (Flickr)

This is the second part of the series on Wordpress tips you really should know. The first part, backing up your Wordpress, is here.

Wordpress, as good as a software it is, has one definite drawback: it can be slow to load. Maybe your readers will sit and wait for pages to load on your blog but, if you can save them the extra seconds, wouldn’t they appreciate it more?

Luckily, there are ways you can speed up the page loads. Drastically as a matter of fact.

First, I’ll assume you are familiar with the following:

  • FTP software to access the Wordpress files. Note that I’ll refer to FileZilla here (free to download for Mac and PC).
  • phpMyAdmin to access and manage your Wordpress database.

So let’s get started!

The Need For Speed… Caching

Caching is a necessity for every Wordpress user. What it is it? Well, instead of generating a page through the Wordpress (and the wait), cuts to the chase and delivers just the HTML page code that is normally rendered. Therefore, your pages can load ten times faster or even more.

There is an awesome plugin, which handles just that, called W3 Total Cache. On this very blog, I’ve noticed that pages load super fast with it. So it gets a heavy endorsement from me.

To install, you will need to first set the permissions  of the /wp-content directory to 777 (see below).

Setting file permissions using FileZilla (right click, select File Permissions)

Now you can download, unzip and upload the w3-total-cache folder to the /wp-content/plugins directory and activate from the Plugins section in your Wordpress admin. The configuration can be accessed under Settings > W3 Total Cache in the Wordpress admin although the default settings should suffice.

Don’t forget to set the file permissions of the /wp-content directory to 755 once the plugin is installed.

Post Revisions Can Slow Things Down

Wordpress has a great feature, in theory, which saves each and every revision of every post as a means of backup. The problem with it is that, each time you edit a post to add a comma or correct a misspelling, an extra copy of your entire post is saved to your database.

The majority of the Wordpress database is composed of blog posts. So, for example, if you average around 4 revisions for every post, your database grows by nearly four times. After a while, it becomes a huge (and slower) database.

If you are like most and can do away with saving post revisions, then you can perform a couple hacks to turn this feature off:

In the /wp-config.php file, add to it this line of code:

define('WP_POST_REVISIONS', false);

Then, using phpMyAdmin to access your database, click on the SQL tab and  run the following command to delete the current post revisions in your database:

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision';

Keep in mind that this will only delete post revisions and will not affect live posts nor post drafts.

Optimizing Your Database

Maintaining the Wordpress database is, fortunately, not a task you have to be on top of. It helps, though, to give it a little care, kind of like wiping the grime off of your computer screen. It has to be done once in a while.

The best tool for that is the WP-DBManager plugin which enables you to perform optimizations on your database tables. To use,  download, unzip and upload the wp-dbmanager folder to the /wp-content/plugins directory and activate from the Plugins section in your Wordpress admin.

You can then access the optimize tool from Database > Optimize DB in the admin and run it with just one click. Then once a month thereafter should do the trick.

Last One…

If you display posts on your home page and notice it loads rather slow, it helps to reduce the number of posts that show on it. You can change this setting by going to Settings > Reading and setting the number to show to a lower number. Normally the default is 10 showing but reducing it to 5 or so will speed up the loading.

* * *

Do you have any other tips to optimize the speed of your Wordpress blog? Drop them off in a comment below.

The Week in Freelance: February 25th

Posted: February 5th, 2010

Wordpress Tips You Really Should Know, Part I: Backups

Posted: February 4th, 2010

Photo by Eric M Martin (Flickr)

Photo by Eric M Martin (Flickr)

Many of us who have our own blogs also do all the maintenance on it. So while I could go on all day about how those nifty Twitter or image plugins can do this or that, you are better off with some tips that you really need to know if you are a do-it-yourself with Wordpress.

This will be the first part of three posts on the topic. So here we go.

First, I will assume you are familiar with FTP software to access the Wordpress files on your server. Note that I’ll be referring to FileZilla, which is free to download and can be used on all platforms.

Part I: Wordpress Backups

A couple months ago, I ran across a post from Coding Horror that raised my eyebrows. Here, we had a programmer who writes and maintains his own blog but ran into a server catastrophe and scrambled like mad to piece his blog back together again.

Now that I’ve apologized, it’s time to let the healing begin. And by healing, I mean the excruciatingly painful process of reconstructing Coding Horror from internet caches and the few meager offsite backups I do have. My first order of business was to ask on SuperUser what strategies people recommend for recovering a lost website with no backup. Strategies other than berating me for my obvious mistake. Also, comments are currently disabled while the site is being reconstructed from static HTML. Oh, darn!

Remember, this was A PROGRAMMER. If this isn’t a wake up call, I don’t know what is.

Luckily backing up your Worpress isn’t such a complex task and consists of the following which I’ll go over:

  • Frequent backups of the MySQL database.
  • Frequent backups of the /wp-content folder on your server.
  • Having a copy of your entire Wordpress blog.

Backing Up Your MySQL Database

There is an excellent plugin called WP-DB-Backup which generates an SQL file of your entire Wordpress database that can be downloaded or, best part, emailed to you automatically at regular intervals.

Simply download, unzip and upload the wp-db-backup folder to the /wp-content/plugins directory and activate from the Plugins section in your Wordpress admin. You can then configure the backup under Tools > Backup in the admin.

Note that, to get this to work, you will need to set the permissions  of the /wp-content directory to 777 (see below).

Setting file permissions using FileZilla (right click, select File Permissions)

After you download your first backup, be sure to set the file permissions of the /wp-content directory to 755.

Backing Up Your /wp-content Directory

As of this writing, I haven’t found a reliable plugin to backup the images on the posts and pages. It’s probably moot anyway since those images would add up to a large backup file over time; likely too large to have it emailed to you.

In the meantime, its best just to do regular backups of the /wp-content directory which contains your uploaded images, plugins and themes. One great way to remember to do this, at regular intervals, is to configure a schedule in the WP-DB-Backup to receive the database backups by email.

Then, immediately after receiving each of those emails, you have a reminder to download the /wp-content directory onto your computer to keep that backup updated.

Downloading You Entire Blog

It’s very important that you have a copy of your entire Wordpress blog. This is especially true before upgrading your Wordpress or when those unexpected moments of breakdown happen to occur.

Since Wordpress files only change when upgrading this only needs to be done once, to have a current copy, then after each upgrade.

(One thing… be sure use the WP-DB-Backup to immediately download a backup file of your database before performing any upgrade.)

Due to conflicts with some plugins and themes, Wordpress is known to break down and give hell after upgrading. So better to be safe than sorry.

* * *

Coming next in this series:  Speeding Up Your Blog.

Introducing A New Sort-Of Twitter (More Than 140 Characters Allowed!)

Posted: February 1st, 2010

Photo by Jeffjose (Flickr)

Photo by Jeffjose (Flickr)

I’m really excited that I recently discovered a new “app” as a part of my social media arsenal. Yes, you got it; something new and different that rivals Twitter. OK, it’s no so new, but it is effective.

Don’t get me wrong; Twitter is a great tool and all, but sometimes I just want to cut to the chase and converse with those that are of interest to me as a freelancer and in my business. With Twitter, I usually get sidetracked enough with unrelated links that it somewhat defeats its purpose.

Besides, I’m a little tired of clicking on to pictures of cats and half-eaten breakfasts already.

So before I reveal what this incredible new tool is, let me give you some of its advantages over Twitter.

1. No follower counts (and insecurity with your unpopularity).

Finally there is no need worry that you have 136 followers while the average number of followers of those following you is somewhere in the tens of thousands. Not that it mattered anyway, but this is no longer an issue.

Ah, who am I kidding? We all look at that count each and every day and look up those users that hit the unfollow button on us. The swine.

Now, though, we can all be created equal and our fragile egos can be saved.

2. Communicate directly to the gurus and experts that would never consider following you.

Have you ever RT’d or sent a tweet to one of those “popular” users in hopes of getting his attention?

Then waited…

Not a thank you tweet in sight. Probably didn’t even notice. He still hasn’t followed you back for God sake.

Wouldn’t it be nice to send a message to him and then he gets back to you? Well, it may happen some of the time but better than being completely ignored.

3. No more 140 character limits.

You are free to write 141, 280, 560 characters or, gasp, multiple paragraphs. Finally say what is on your mind and don’t leave out one single detail. You can even throw in that photo of your cat eating breakfast (though not recommended).

4. Steal traffic from other websites to yours.

Sure, Twitter is a great way to bring traffic to your website. More traffic couldn’t hurt, right? It’s especially true if you can “borrow” it from other websites with a lot more traffic.

Yes, there is a little greed factor here.

5. Meet others with similar interests.

I personally hate following a user that seems to be interesting but finding only nothing but tweets about Jersey Shore and cats coming from his feed.

Booooring.

None of that here. Filter out the crap and save yourself the unfollow time.

So What Is It?

It’s nothing you haven’t heard of before. In fact, you may have used “it” but without realizing its full potential.

Introducing… [drumroll] the blog comment.

How many times of you read a really good blog post, bookmarked it, tweeted a link to it and printed it out but never left a comment telling the author how good it was along with a reflective thought?

Nothing flatters an author more (even the popular ones too) than noticing that his readers are influenced by his or her work. Plus you get a little something in return by leaving a link to your blog or website along with your picture (by getting a Gravatar).

Instant branding… just like with Twitter.

Just remember to be sincere and leave a thought provoking response. That might be just enough to get that author’s attention and have him visit your website. Maybe he’ll even like what he sees on your website and recommend you to his friends.

Sure beats waiting for him to follow you on Twitter.

The Week In Freelance: January 29th

Posted: January 29th, 2010

Valuable Lessons Learned From A Cockroach, A Can Of Raid And Some Spare Time

Posted: January 28th, 2010

Photo by Misiek_beauchamp (Flickr)

Photo by Misiek_beauchamp (Flickr)

I personally don’t like unannounced visitors prancing around my apartment. OK, maybe with the exception of the lovely Marta on the third floor. But this one was particularly unwelcome… a cockroach so big that it probably scared off the rats safely chomping away nearby. Hell, the thing probably ate the rat for all I know.

I don’t know why my first reaction to seeing unwanted critters is to run and grab a can of bug spray when a quick squash with a foot would do just fine. Something about seeing the white and yellow bug guts just doesn’t go right with me.

Anyway, after unleashing a virtual swimming pool of Raid on the poor bastard and waiting and waiting some more, I got to thinking, hey, there could be a lesson in freelancing learned here. And indeed there was. Several as a matter of fact.

Death can probably come at any moment. Humans included.

I’d expect a bug spray to kill on the spot, like the good old foot. But in that minute or so while our invader was dying, I suddenly had that thought of my own mortality. You know, the one that makes you take up praying or give in to those Watchtower folks who pay a household visit once a year.

So, diligently thinking, do I want to leave a legacy of websites and a current half-built one for Mr Jones? Or do I want to leave a legacy where thousands of people were positively affected by my work?

Well, I also have that goal of one thousand fans on my blog. Let me check on it… 105, so nope to that.

Time to get to work.

Make like Custer, errr, Davy Crockett and fight to the end.

About a minute and a half passed while I watched the critter make every attempt possible to, well, survive. As I blocked his escape to the safety underneath the fridge with the foot (still too scared to crush the damn thing), I thought, man, is this one tough little bugger. No wonder they may take over human existence during the Apocalypse.

Then something crossed my mind again. Do I have that kind of fight in myself, especially in my freelance career?

In other words, am I learning as much as I can while being as productive in my work as I can?

After the nap and Twitter session I just had, that’s probably a negative as well.

Now it’s really time to get to work.

We’re not cockroaches, we’re human. Life can’t be that bad.

Cockroaches, depending on species, have an average life span between 3 months and two years. That’s plenty if you normally crawl around the sewers and kitchens of unsuspecting freelancers. That is, unless you’re unlucky enough to die by a healthy shower of insecticide.

I go through hard times just like anybody else. Some days, nothing seems to go my way. I can still afford the roof over my house, have the daily ramen to eat and the work flow has been good.

I’ll be sure not to not take these for granted while Mr Jones is yelling on Skype about his website being down for 15 seconds. Come to think of it, nor when someone decides that a typo on my blog is reason to unleash the reasons I’m going to hell.

I still got my five flavors of ramen sitting in the cupboard. My reasons for being.

Stick your head where it probably shouldn’t be.

I actually began to feel sorry for the poor sucker. Wrong place, wrong time. If you only laid low until my bedtime, you could have feasted on those breadcrumbs and two grains of rice. Like they say, curiosity killed the cat or the cat-like creature.

We’re not cockroaches, though, nor cats. We won’t die by scratching that itch we have doing that one thing that’s been on our mind forever. At worst, we’ll be embarrassed, humiliated and have deal with a bruised ego.

Better than swimming around in a pool of Raid I say.

Raid “kills bugs dead” but keeps freelance careers in perspective.

You Are Now Allowed To Give In To Your Mondays

Posted: January 25th, 2010

Photo by Queguenae (Flickr)

Photo by Queguenae (Flickr)

I’m fairly amused to live in Spain where the average workday is very atypical for that of the average freelancer or employee in English speaking countries. In fact, here is what would occur on a normal working day:

9:00 AM – Start work by checking email and chatting with the workmates.

9:30 AM – Break for a cup of coffee or beer (yes, this early) with the workmates down at the local bar.

10:30 AM – Return, begin real work.

1:00 PM – Break for lunch and a siesta (and maybe another beer).

4:00 PM – Return to work, chat with workmates (going back to bar optional).

4:30 PM – Continue with real work again.

6:49 PM – Hmmm, about 7 PM, time to go home.

Now, it’s probably a given that sticking to this kind of schedule would not get me too far as a freelance programmer. You might even go as far as to equate this as “treading water.”

Except on Mondays when it absolutely rules.

To explain, I always have it difficult on Mondays. You know, having to deal with the email requests that come over the weekend, thinking of something to write for the blog post, periods of sluggishness followed by moments of caffeine highs. Stuff just doesn’t get done like, say, on a Tuesday. I’m not even talking hangovers here either.

So I decided, screw it, I’m going all Spanish on Mondays from now on.

Sleep in an extra hour.

No more Monday deadlines.

Chat with my friends down the street over a beer (at 9:30 sharp).

Not bang my head trying to write THE blog post. Halfway crappy will suffice.

Nice long siesta. Now we’re talking.

Don’t get me wrong, I probably hover around 50 hours a week working my freelance projects, blogging and doing other personal projects. I’m not quite that lazy. (I know, I know, only 50 you say with a laugh)

But you know what? Tuesday thankfully come a lot easier now. All 18 hours of work that follows it.

I’m just hoping the day never comes where we have the morning beer over Twitter.

Top Ten Rules In Freelancing You Probably Shouldn’t Break

Posted: January 22nd, 2010

Freelancing has its sort-of ten commandments (actually its more like 387) that we should all follow if we want a nice, long and healthy career. In my experience, the following are THE top ten rules, coincidentally, written in stone and propped up to hold my bookshelf.

10. Eliminate distractions while working: Your friends and followers on Twitter demand your full and complete attention.

9. Take advantage of social media for networking: Look, if you are going to stay cramped up in your house, working all hours of the day, you might as well have a social life, even if it is only (somewhat pathetically) online.

8. Keep your day job while starting out: That way if a client happens to tell you “Don’t quit your day job” then you can smugly reply “Hah! I didn’t.”

7. Always use a contract: We would have to keep lawyers in business otherwise.

6. Raise your rates periodically: A no-brainer… you have to keep up with the minimum wage hikes you know.

5. Never miss a deadline: You might, like, get fired or go to prison or have a hit put out on you. So bad.

4. Carve your own niche: Did you know there’s a market for sex-with-1973-Gremlin-mufflers dating websites? Sorry, that one is taken already.

3. Keep your portfolio up to date: Great way to get the hit counter to finally move forward on your website.

2. Consistently market yourself: Hey, someone will bite, even if it is your parents or that weird next door neighbor that does so.

1. Pay your taxes on time: Advisable if you do not want to be put on a no-fly or terrorist watch list.

Page 1 of 2312345»...Last »