Posts Tagged ‘web server’

Hotlink Protection Plugin for WordPress

Welcome to my blog, please feel free to subscribe to my RSS feed, join me on Twitter or leave a comment.

Everyday websites suffer performance loss and higher bills due to bandwidth thieves. This plugin adds the necessary code to your .htaccess file to stop people from loading your graphics from third party websites.

What is a bandwidth thief?

Since many website hosting companies charge per file transferred (or total file transfer size for the month), unscrupulous website owners often load key graphic files from smaller, unsuspecting website owners in hopes of both lowering the costs of running their website and increasing the performance of their site.

This plugin uses Apache’s .htaccess capacity to stop foreign websites from loading images from your web server.

You may download the WordPress plugin for free.

Coming Soon! WordPress Theme

comingsoon Coming Soon! WordPress Theme imageThis theme may go down in history as my lamest theme ever but it’s a utilitarian theme designed with a simple purpose, to display a Coming Soon! message on the homepage as a notice to new comers while the website is under construction.

To install the theme, simply download the ZIP file and uncompress it before uploading the resulting /coming-soon/ directory to your web server.

Why build it?

Actually it’s a funny thing, I’ve written before that sometimes when you write a blog you need to review your Analytics (The Vomitorium and Data Mining) and looking over my numbers today, I’ve seen a steep climb in the number of people searching for a template like this.

The Coming Soon! theme offers users the ability to quickly add a page while still allowing you to track the vital statistics and add plugins such as Google Analytics or keyword tools. The theme makes full use of the header and footer functions, without displaying any actual website content. 

Customizing the Theme

This theme is a bare bones WordPress theme. In fact it doesn’t even make use of the Loop so if you’d like to customize it by adding a graphic or changing the text, simply open the index.php file and add basic HTML within the <div> tags.

download file Easy Technorati Tags for WordPress

WordPress PHPINFO() Plugin

It’s important for a non technical administrator to be able to diagnose server related problems in WordPress but also rapidly retrieve feedback regarding their web server. This simple plugin adds an option to an adminstrator’s Tools menu which displays standard phpinfo() feedback details to the user. 

This a very simple script, designed to help the non technical user get immediate feedback about their blog.

It’s very easy to run a phpinfo() session without running a plugin and I can already hear a lot of people pointed out that this is a little like swatting a fly with a bulldozer but recently I’ve been working with a lot of charities and not-for-profits who lack in-house technical support and the simple process of running a phpinfo() query was daunting.

For those of you who want to run this as a page rather than a plugin, you can upload a php script to your website with the following code:

<?php phpinfo(); ?> 

Once you upload the code, simply access the page via the URL. On the other hand, if what I just typed made no sense what-so-ever … 

download file WordPress PHPINFO() Plugin image

How You Can Help

I love developing plugins for WordPress and do my best to always keep them free but of course it take a lot of time and effort to build these plugins so if you’d like to say thanks, the best way is to take a few moments and write about the plugin on your own website, include a link to my website from your posts or download and rate the plugin on the official plugin directory.

Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.

Simple tricks to speed up your WordPress website.

WordPress is a great tool but for those of us on shared hosting it’s important that as our web traffic increases we look at ways to decrease the amount of stress our sites put on the web server. I found a couple of wonderful suggestions on Lorelle’s website and I’ve added a few of my own.

There’s a couple of reasons for this, first we want to make sure our web pages load as quickly as possible but as importantly we want to ensure our website stays online. There are countless stories on the internet about websites that suddenly found themselves very popular and struggled to keep up with the traffic, only to have their account temporarily shut down by the hosting company.

WordPress is written in PHP and uses a MySQL database to serve up content. This is great except the content on your website doesn’t change all that often so why are you dynamically generating it for each visitor? Instead of rebuilding the xHTML for each visit, why not serve them a previously saved version? We call this caching a website and it can be done with the wp-cache plugin from Ricardo Galli Granada.

So the first step to increased speed of your WordPress website is to download and install the WP-Cache plugin. It allows you to set how many seconds between page caching as well as if any specific files should never be cached. Very handy. You should also make sure you’re on a reliable web host who can handle the traffic.

Diggproof & Speed up Your Wordpress Blog has a great and often overlooked suggestion. Upgrade your WordPress blog. This might sound silly but generally speaking the latest code releases for WordPress are stable and optimized, so taking a little bit of time to upgrade your site during each release is a solid idea.

Unused plugins can kill performance so before you go installing and forgetting about your plugins, make a habit of deleting unused plugins. Some people might assume deactivating them is good enough but personally I prefer to delete them.

Using a tool such as phpMyAdmin take time once a week to optimize your MySQL tables. If you don’t have access to phpMyAdmin, execute the following SQL statement from your command line to make sure your tables are in the best shape possible:

OPTIMIZE TABLE `wp_comments`, `wp_links` , `wp_options` , `wp_postmeta` , `wp_posts` , `wp_ratings` , `wp_terms` , `wp_term_relationships` , `wp_term_taxonomy` , `wp_usermeta` , `wp_users` , `wp_wpsb_users`

Arne has some great suggestions for MySQL Query Cache and PHP Compiler Cache options, they’re pretty technical but well worth it if your running into significant server speed issues. If you’re technical, give this article on how to configure Apache a read as well, it will help you optimize your whole site.

Paul Stamatiou makes a great point by writing “Every HTTP request, or loading each item on your website, has an average round-trip latency of 0.2 seconds. So if your site is loading 20 items, regardless of whether they are stylesheets, images or scripts, that equates to 4 seconds in latency alone“. So, take a good long look at your theme and determine what you really need in there. I saved a ton of time per page load by stripping out over 20 JavaScript calls and replacing them with PHP scripts which are cached once every five minutes. I also combined all my CSS files into a single file which decreased the number of HTTP requests my server had to take. Paul also have a great article on Compressing CSS with PHP that you should read if you still need to speed up your site more.

There’s another great suggestion from WPCandy that I’m extremely reluctant to do, but I know they’re right. First, use shorthand CSS so:

#commentarea li {
margin-top: 10px;
margin-bottom: 10px;
}

should become:

#commentarea li {
margin: 10px 0px 10px 0px;
}

You should also decrease whitespace (that’s the empty space between tags), sure it makes it look better but it also takes up bandwidth.

Finally, decrease your overall database calls. WordPress gives us all sorts of great functions in our templates but really do you need to call the website name from your database? The simple answer is no, so let’s decrease the over all number of MySQL queries by optimizing our templates. Replacing with your title for example will help decrease the server load.

I hope this helps, if you have any other suggestions for how to optimize WordPress and speed up the site please let me know.