Posted on Leave a comment

Manually update WordPress

Wordpress Logo

So you want to manually upgrade your WordPress installation since the one-click update option is not available due to an ancient (pre 2.7) version or missing file permissions. Although using the one-click update option is the most comfortable one you can almost as easily update WordPress manually. The following steps show you how to manually update WordPress.

Backup database

As usual make a backup of your database and your files. In case you don’t have access to tools such as phpMyAdmin or a shell terminal with proper permissions to export your database have a look at Shuttle-Export, which is an easy to use PHP based MySQL dump library. Make sure to remove this tool after the upgrade process again or protect it with .htpasswd since you most likely don’t want strangers to export your database.

Deactivate plugins

Next, before removing files from your existing installation make sure to deactivate all plugins.

Remove existing installation files

Once again, make sure you have backed up your data and deactivated your plugins. Then remove all files and folders except the following from your installation:

  1. /wp-content
  2. /.htacess
  3. /wp-config.php

Copy new files

Afterwards, copy all files and folders from your new WordPress version, thus overwriting existing files except the ones mentioned above.

Database upgrade

Now it’s time to check if a database upgrade is necessary. Thus, navigate to /wp-admin/. If your are asked click on the upgrade database button. Once this is done click continue and re-login into the dashboard as admin.

Final checks

Finally, check your settings and enable your plugins again. Also check for possible plugin updates. This is all there is to manually updating WordPress. Almost as easy as the one-click update, right? Make sure to remove or password protect your Shuttle-Export installation. You’re all set!

Posted on Leave a comment

Google mobile search update

Google Logo

Today, Google has released its newest search algorithm update for mobile search results. It is specifically targeted at displaying mobile-friendly website results in favor on non-mobile versions. In the first phase of this update the focus lies in searches conducted on smartphones only, tablets and other mobile devices are not yet being targeted by this update, but chances are that they will be added soon.

Quick check

Is your site mobile-friendly? Check it now to ensure that you are listed in the mobile search results using the Google Mobile Friendly Test.

More information

Find more information on the smec blog (German).

Posted on Leave a comment

Updating Select Options and InArray Validator in Zend Form

Zend Framework Logo

When using Zend_Form’s multi-select with dynamically set options you need to make sure to update your options and the InArray validator accordingly when validating data using form->isValid().

In order to update selection options and update the InArray validator we need to first set the options, remove the currently set InArray validator and set it with the desired valid options, as shown below:

$options = array(); // ...

  ->addValidator(new Zend_Validate_InArray(array_keys($options)));

That’it it.

Posted on Leave a comment

Updating Tables across multiple Databases

Recently I was asked if it is possible to update tables with data from other databases. Of course it is 🙂

Imagine the case where you want to update your customer table with data from a backup database. Let’s call the current database currentDB and the backup backupDB and the customer table respectively customer. Furthermore, let’s say column address got messed up and you want to restore it from the backup database. The following SQL statement does this job:

UPDATE  `currentDB`.`customer` `cdb`
JOIN `backupDB`.`customer` `bdb`
ON `cdb`.`customer` = `bdb`.`customer`
SET `cdb`.`address` = `bdb`.`address`;

As you can see updating tables across multiple databases straight forward. You only need to join the tables from your databases (based on a private key as usual) and set the values accordingly.

Pretty easy, right?

Posted on Leave a comment

Update button text in JQuery Mobile

jQuery Logo

In case you wondered how it is possible to update the text of a <button> element created by markup in jQuery mobile (i.e. not a button generated using <a data-type=”button”>) you need to set the text and then call refresh on the node:

$('#someButton').text("Updated text");

refresh() actually causes the node to be reloaded, thus reflecting your changes.

Posted on Leave a comment

Google Maps update fails on HTC smartphone

Android Robot Logo

Recently I wanted to upgrade Google Maps on my HTC Desire running Android 2.3.3. Unfortunately the update kept failing with the following error

failed to download update…

After several attempts to restart the download process I gave up and restarted the phone and tried again – without success. Then I realized that the automatic update was enabled for this app. So, I disabled it, restarted the phone and the update process – with success!

I have reproduced this problem on a HTC Wildfire and a HTC Legend using different Android versions. It seems like the latest version of Google Maps requires the automatic update to be disabled to run the update? At least it worked this way and I have enabled the automatic update again – let’s see if it works out of the box for the next update. UPDATE: Today another update became available, so I tried my luck. Unfortunately, I had to disable the automatic update, restart the phone and run the update manually again.