Amazing trick
Aircraft Carrier Story
#1: Please divert your course 15 degrees to the North to avoid a collision.
#2: Recommend you divert YOUR course 15 degrees to South to avoid a collision.
#1: This is the Captain of a US Navy ship. I say again, divert YOUR course.
#2: No. I say again, you divert YOUR course.
#1. THIS IS THE AIRCRAFT CARRIER ENTERPRISE, WE ARE A LARGE WARSHIP OF THE US NAVY. DIVERT YOUR COURSE NOW!
#2. This is a lighthouse. Your call.
911 Turbo
Split large files
From time to time I need to split large files to smaller ones. This time I had to split an XML file to small chunks of XML files. I could do the split with Total Commander, but unfortunately this program doesn’t know how to split files without breaking the data. A while ago I needed to split an SQL dump, because it was to big for uploading it to the server. Today I found a great tool, that can do split the large files, be that SQL, be that XML based on occurrence of something: GSplit.
For example an SQL file has the “INSERT INTO”. So I can tell to GSplit to split the file after the 100th occurrence of that Insert into, and this way it won’t break my queries. Also I can tell the program to split it after the whatever number of occurences of </item> and it will generate the files.
And the cherry on top of everything: Gsplit is free!
What is the point of no spam spam?
Today I received a bunch of non-spam looking spam. The interesting part was, that when comment spam comes, there are a lot of urls in the spam body. Or the “url” contains the spammy adress. But apparently sending “real spam” cannot full anybody so the spammers got smarter: they send out a bunch of comments, that are not look like spam. The texts are general, so it may look legitimate, and when you check, the “no url”, or “bing”, “google” as sender´s url, you might think, the guy or girl doesn´t even have a website, how can that be spam, let´s approve it. But here is the catch. At least I think it is the catch: if you approve the spammer’s mail, next time the real spam will go through mostly without any checking. So watch out what kind of comments you approve. It may look legitimate, but can be spam.
these cron jobs are killing me…
I figured out the following: there is an option in wp-option table. The option name is very “suggestive” :) cron. The value is
like this:
a:8:{i:1303218061;a:1:{s:19:"wp_scheduled_delete";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";
a:3:{s:8:"schedule";s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}i:1303218983;a:1:
{s:24:"akismet_scheduled_delete";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";
s:5:"daily";s:4:"args";a:0:{}s:8:"interval";i:86400;}}}i:1303220910;a:1:{s:8:"do_pings";a:1:{s:32:
"40cd750bba9870f18aada2478b24840a";a:2:{s:8:"schedule";b:0;s:4:"args";a:0:{}}}}i:1303221103;a:1:
{s:11:"wp_cache_gc";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:2:{s:8:"schedule";b:0;s:4:"args";
a:0:{}}}}i:1303231010;a:3:{s:16:"wp_version_check";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:
{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}s:17:"wp_update_plugins";
a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:
{}s:8:"interval";i:43200;}}s:16:"wp_update_themes";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:
{s:8:"schedule";s:10:"twicedaily";s:4:"args";a:0:{}s:8:"interval";i:43200;}}}i:1303418027;a:1:{s:23:
"dbmanager_cron_optimize";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:18:
"dbmanager_optimize";s:4:"args";a:0:{}s:8:"interval";i:259200;}}}i:1303763627;a:1:{s:21:
"dbmanager_cron_backup";a:1:{s:32:"40cd750bba9870f18aada2478b24840a";a:3:{s:8:"schedule";s:16:
"dbmanager_backup";s:4:"args";a:0:{}s:8:"interval";i:604800;}}}s:7:"version";i:2;}
now, this is fine, nice, whatever, but I needed something more “readable” right… I am just a person, not some freaky computer who reads this kind of gibberish…For this I installed “Crony Cronjob Manager” and with this I was able to see the following:

this is the “translation” of the “gibberish” from above, and as you can see, there are a few things scheduled there.
Now I like to have my plugins updated. I do update them once in a while, but checking 2 times a day for updated plugins???? This is CRAZY. In my opinion this should run somewhere one time in 3 days, I personally would let mine to do the checkings only one/week. Of course this is something I see it right THIS way, so this is why somehow I should have control over.
I tried to change the update times, simply edited the “gibberish” but when I did that, something went wrong, and half of the crons disappeared. For the testing all I did to change the “twice daily” to “Once Daily”, but that didn´t worked.
I edited “twicedaily” to “daily” and the corresponding interval 43200 to 86400. Did it worked? NOPE. Luckily I had some backup and put it back. But now I am stucked. I now use a plugin to stop this “update madness” and do it manually once in a while, but I wish I could just edit these and set it up wordpress to run the update checks from time to time.
I would like to keep the dbmanager cron for optimizing and scheduled backup as is, but every other I would like to change.
It may sound strange why I need this, but I need it and it kills me that I am unable to figure out how.
Automatic database optimization and backup with WP
According to wordpress codes there is a way to do automatic optimization to your wordpress database table.
Automatic Database Optimizing
Added with Version 2.9, there is automatic database optimization support, which you can
enable by adding the following define to your wp-config.php file only when the feature is required
define('WP_ALLOW_REPAIR', true);
The script can be found at {$your_site}/wp-admin/maint/repair.php
Please Note: That this define enables the functionality, The user does not need to be
logged in to access this functionality when this define is set. This is because its main
intent is to repair a corrupted database, Users can often not login when the database is corrupt.
now I added this to one of my sites wp-config and nothing happened. In phpmyadmin I saw that there are tables that need to be optimized, but the that don’t happened. This is when I decided I need something more that I can have better control, so I searched for a plugin to do this for me. First plugin I tried was WP-DB-Backup and it worked like a charm. If you only need database backup this is a nice solution. You can schedule the automatic wordpress database backups and get them in your mail or download them from your server. Also can make a backup to any other tables in the same mysql database, and this can be handy if you need one or another table to be saved.
Because I wanted a plugin that could do some optimization to, I searched and found Wp DB Manager. This also has an automatic backup creation part, and it can schedule optimizations to.
As non automatic solutions there are a few phpmyadmin plugins and you could do manual database backups. A while ago I used wp-phpmyadmin, but that was a few versions ago, since wordpress 3.1.1 is out I don’t know which plugin is working or not.
Always backup your databases. One day you will thank yourself if something happens and you have some backups by hand!
Pagespeed
From time to time I have a feeling that I live in a paralell universe. And I wake up one day, and have tools that wasn’t there a few days before, but this happens only for me, because most likely everybody else were using these tools for a while now. Anyway this is what happened with “Pagespeed” too. I found it and realized there is a lot to do with this tool. The online version is just a “demo” in my point of view, the “real” tool begins when you download the plugin (I used the firefox version) install it and start running some tests.
What is really wonderful is that you can save the optimized images, the minified css, also a lot of suggestion what you should do, where you should start the optimization for your page to load as fast as possible. It will also give a score for your website’s load time. It can be very addictive to try to get as higher score as possible :D
It is very similar with Yahoo’s Yslow. In fact both of these tools, Yslow and Google Page Speed require Firebug to run, they are “new tabs” between Firebug’s other tags. It took a while for me to realize the obvious: I need to clear my browser cache each time I want to see the real numbers. Without that, it kept loading the cached version of my javascripts, css and images, and was showing the very same errors over and over again. I just set up my firefox to clear all the cache when I close it and every time I needed to have my data downloaded again, I just closed my firefox.
If you need a “developer” version of firefox, because for example you don’t want to clear the cache every time you close firefox, you can use “Firefox Portable” for this.
Another great tool is WebPageTest. What I like it at WebpageTest is the website loading visual comparator tool, that can show you the difference between 3 sites. It will create a cute video to :D
Wp Questions
Hehe… if you have a question, here is a place where you can ask for answers: WP Questions
I had no idea until today that this kind of site exists, but now I am happy that I discovered it. There is a community here, and if you stuck with something wordpress related, you just get an account, pop up your question, offer some $ and somebody will come with a fix for you. When you got the answer that works for you, just pay the one who helped you out by paypal and everybody is happy. Obviously there are a bunch of already answered questions, so this is only a small reward you need to pay for somebody who has taken your particular question and tried to help you out. It is a win-win for everybody, because for small issues you don’t need to hire expensive webdesigners.
WordPress SEO Meta Tags Without Plugins
Ultimate WordPress SEO Meta Tags Without Plugins is a nicely written tutorial on how to add SEO meta tags to your wordpress without using plugins.





