What to do when “Another update is already in progress”

You’re right in the middle of updating your install of WordPress to the latest version when suddenly there’s a solar flare! — and everything stops. When you reload the Updates page, instead of the expected blue “Update Now” button, there are these words: Another update is already in progress. Huh? You check the front end […]

Configuring a php.ini file for AddOn Domains hosted on GoDaddy

UPDATE It appears GoDaddy no longer supports multi-domain php.ini files. Instead, one has to put an ini file at the root level of each hosted domain. For the primary domain, the ini file would go in ~/public_html/. For AddOn Domains, the ini file would go in ~/public_html/[AddOn Domain]/. For instance, if the domain for the […]

Freeing a site stuck in maintenance mode

HELP — IT’S HAPPENED TO ME. TELL ME WHAT TO DO! The WordPress “update” function is one of its strongest features, downloading and swapping in updated Themes, Plugins, even components of WordPress itself, all with a single click. When it works, that is. In order to perform this update, the function temporarily puts the site […]

How to prevent WordPress from overwriting your rewrite rules

Provided the permissions are properly set on the .htaccess file, WordPress will update it with its own rewrite rules whenever the “Save Changes” button on Settings > Permalinks is clicked, like so: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] […]

Hardcoding a default theme

To preset a custom theme as the default for a WordPress project, copy it into wp-content/themes/, then add this line to the wp-config.php file, replacing ‘theme-name’ with the name of the new default: define(‘WP_DEFAULT_THEME’, ‘theme-name’);

REM to Pixels calculator

Few are the occasions when I’ve needed to convert pixels to REM, usually only when I’m working with a child theme based on one of the default WordPress themes (like Twenty Sixteen). Even fewer are the occasions when I’ve needed to reverse the sausage crank and convert REM back to pixels. And yet, it was […]

Installing WordPress in its own subdirectory

There are occasions when I prefer to house WordPress in its own subdirectory, such as when I’m using it as the core CMS but building auxiliary functionality alongside it with something like CakePHP. Note: If you’re planning on using version control with your project, I’ve outlined a slightly different method for installing WordPress in a […]

Pixels to REM calculator

The default WordPress theme Twenty Sixteen is clean, simple, and responsive; as such it makes a perfect “starter” theme for all but the most arcane designs. However, it uses REM — a.k.a. relative em units — for the all the measurements and sizing in its stylesheet and, unfortunately, unless one is a genius, REMs have […]

Image Path in CSS File

Image paths are relative to the CSS file that contains them. If, for example, you had your images and css files each in their own subdirectories within the theme (i.e. “img/” and “css/”, respectively), here’s the path one would use: .navigation { background-image: url(../img/navigation.png); }

Disabling Comments on Posts and Pages

By default commenting is enabled on both Posts and Pages in WordPress. Here’s how to disable it: Existing Posts Click Posts in the left navigation. Click the checkbox in the section header (to the left of Title) to select all pages. Select Edit from the Bulk Actions dropdown and click the Apply button. Select Do […]