Consequences of using SEO software

If you are going to decide about using some SEO software for your projects, keep in mind that this “solution” has its dark sides. One of the most annoying drawbacks of using SEO software is that you shall almost immediately start to receive SEO spam to your clients mailboxes.

So think twice before going into any SEO “automation”. What this automation is designed for is to generate business for SEO software companies, not for you. And if you think deeper, you will find all that “solutions” useless.

If you are about doing SEO, do it by providing good content organised in a logical and consistent way, keeping a formidable structure of your links. Search engines will love you.

Also consider reading Yoast.

mDNSResponder problems and solution on Lion

If you have ReadyNAS NV+ in your network with 4.1.8 software installed, you may have server outages if you use OS X Lion machine. The outage is caused by poor new design of the mDNSResponder (Apple fault thinks different as always). Multicasts from Lion machine force avahi daemon on ReadyNAS NV+ to close services. Disabling Bonjour on ReadyNAS will not help. To fix the issue you have to disable multicast edit /etc/hosts on a Lion machine.

/I am leaving this as advice for those who wants to debug their network with Lion machines in it/

Be careful, since breaking mDNSResponder configuration can lock you out from OSX Lion.
Step 1. Make a backup of the mDNSResponder.plist file as a necessary precaution.
Step 2. Open the mDNSResponder.plist file in Terminal using your preferred text editor. Here is a command:
sudo nano /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
Step 3. Add “-NoMulticastAdvertisements” to the array in the “ProgramArguments” section.

The bad thing is that you will loose ability to discover network printers from Lion, if they are advertised via Bonjour service. Workaround – set printers by IP manually.

UPDATE: it “works as designed”. What Apple forgot to say is well put in this article by Justin Carmony. I reenabled multicasts and Bonjour after adding reverse resolution in /etc/hosts for local machines running Lion. So far so good, ReadyNAS NV+ feels good for the first 30 mins ;-)

Enable WordPress Update from SSH

There are few good tuts that works for CentOS 5.6 with php53.
Jacob from dynamichosting.biz wrote a good guide to install ssh2 extension for php53 that worked for me.
Than follow these directions provided by Johnathan Dingman.
After you succeed with install, have a look at this Codex Page and make amendments to your wp-config.file to perform further updates with a single click.
All credit goes to these fine gentlemen mentioned above. I will only remind you not to be afraid of a bunch of warnings when you install php-pear. Force install and may the Force be with you.

qTranslate integration with WP3.x Nav Menu

The whole topic is year old, and there are few good solutions posted on this thread at Qian Qin’s Support forum.

I posted this one, which is altered Woo Themes workaround for the same problem with Home link, modified using qTranslate getLanguage() function.

This is a template. Make a page called anyhow on this custom template basis, than link to it in WP menu. Use URL you need in template, it will redirect language accordingly.
Now you can link to your Home page from WP Menu and it will be correctly translated.

Debug WordPress latency after database import or upgrade

I was really stuck recently, when client websites started to show unbearable 5-11s latency after importing to their new home WordPress installations. It took time to debug and it let me learn a trick or two on mysql performance optimisation. This is something I’d like to share.

Firstly, do not run into mysqld variables shuffle and editing. Check the source of the latency. It may arise for quite different reasons. And definitely – do not alter ‘localhost’ in your wp-config.php to your hosting IP address, that won’t work anymore. What I recommend – make some changes in wp-config.php and the footer of your theme to enable MySQL query debugging.

Add

1
define('SAVEQUERIES', true);

instruction to wp-config.php to enable debugging mysql queries. To output them, add

1
2
3
4
5
6
7
8
<?php
if (current_user_can('administrator')){
global $wpdb;
echo "<pre>";
print_r($wpdb->queries);
echo "</pre>";
}
?>

to your theme’s footer. It will make output visible while you are logged in as administrator.  Now you can sum up all the time from your queries and check if too many or too long queries are the reason of your website latency. Now you have strategy. Either cache bad long queries, make database optimisation, reindex what is needed, or increase memory allowance to PHP or WordPress itself.

If you are running MultiSite, it is always good to explicitly define the memory limit available for WordPress by adding

1
define('WP_MEMORY_LIMIT', '64M');

to your wp-config.php.

Such problem can arise when you have large image galleries to show, when you run MultiSite with new sites imported from older installations, or when you have caching disabled in MySQL.

Suggested reading for further enlightenment:

What to edit in wp-config.php

How to optimise MySQL performance

If your site generates way too many queries to database, i.e. more than 1000 per GET, you should check your wp-options table and .htaccess rules. The root of all evils (up to WP version 3.2.1 is to keep permalinks structure like /%category%/%postname%/. Start it with /%year%/ and your website latency may become immediately cured.

WP Minify is blessing

I had to go through 21 plugin with a map and chisel on one of my employer’s projects recently. Most of them shared similar scripts, many added unused CSS. After inspection I realised, that all this mess could be shortened. But doing this manually would consume an exorbitant amount of time. Instead, I searched WP plugin database for an automated solution. And I have found it. It is called WP Minify. It does the tedious job of sorting your JS and CSS files, combining them, and compressing all together. In just one sitting you can improve your page loading time three times.

To make plugin working you shall need to allow server to write to plugin cache folder and to change its configuration files. This can be done with chown and chgrp commands. If you do not have access to them, ask your hosting provider to change permissions for these files respectively.

Hello world! Boring tasks of system administration are close to completion.

After midphase.com dumped my old hosting plan without notice, I started to think, is it really that complicated to run a small hosting yourself? After all, Linux OS is very well documented and you just need to read and listen, and do good. Oh, I learnt very well how not to do unnecessary, the cost of “interesting” could be huge on a personal scale in terms of wasted time. Thus, limited myself to very basics with no X-related fun, I have started to run this at rackspace. Just because ping is better to rackspace in London than to gandi in Paris.

What was bad, I am in the middle of a project for my current employer, so I only got few evenings to everything set up. What was good,  I have got around 30 of such evenings to have fun with a new server setup.

Rackspace lacks CentOS 5.6 docs in its knowledge base and is really making business on tech support, keeping its predefined system images just bare bones. It took time for me to realise that their repos does not install PHP 5.3 by default, so if you mistakenly did

# yum install php

than you have to yum remove it, instead doing

# yum install php53

Since by default CentOS 5.6 still includes PHP 5.1 in default software distribution.
Fortunately, MySQL was not an administration problem.

Here I am. Happy birthday!

Which WP plugin to use for multi-lingual site?

WPML or qTranslate? Of course, qTranslate. It is easier to follow and well documented plugin, has a very healthy community around it, and you can fork your favourite plugins to work with it.

Cost
qTranslate: Free
WPML: $79

User base
qTranslate: 2656 members, 535 ratings at WP.org, 290 000 downloads.
WPML: 70 showcases, 17768 posts on users’ forum. Download number not disclosed. Members number not disclosed.

qTranslate sitemap: 65236 downloads
WPML sitemap: 3386 downloads

I believe, that qTranslate community is healthier.

Visited expo, found the plugin

Yesterday I visited expo. I looked for solutions for my e-mail marketing and event management mess, I am struggling around all the time with permanent success. And I have found some.
Nice guys from elliottyoung were very kind to introduce me to their WP-based event management solution. They spent kinda 6 man-months of development time on it. I was not really much impressed of the admin panel design, but their set does the job, and for the 2000 quid site license can be a bargain for a one-man show events producers and corporate hospitality fans. Heck, it will even work for a larger business.
Of course, you can set up your own framework using BuddyPress and Events Manager for it, write custom post types for your Speakers and Exhibitors, and go on. It will be a pleasant and fruitful exercise, but it will not save you the precious time. So if you are in management business – have a look on elliottyoung’s job. They even have an app for every feature-rich smartphone to use with your events management wordpress-based website.