WordPress Post Revisions

Have you notice that WordPress saves post revisions for you?  It is a great utility!  

Try it out yourself.  Edit a post, click “Update”, and voila, you have Post Revisions!

Post Revisions
Post Revisions

But sometimes, post revisions can seem to get out of hand.  Do you really need or want hundreds of revision histories?

Well, WordPress is here to help you.

First, let me mention that revisions take up space — usually a lot of space.  Each revision is held as a separate entity within the database.  Therefore, unlimited revisions is usually not a great idea.  But having revisions is usually a very good idea, as you may already know.  

There are a few settings available to modify how WordPress will be handling revisions for you.  They are all contained in the wp-config.php hosted in the main directory of your WordPress instance.

Defining the number of revisions

Revision count is set in the line 


  • true or -1: This is the default option in WordPress.  WordPress will store every revision of every post
  • false or 0:  This eliminates all revisions.  The only version retained is the most recent saved version.
  • Any number greater than 0:  This limits the number of revisions to a specific number and automatically deletes all other revisions.

Defining the Autosave interval

WordPress will automatically save posts for you after a defined number of seconds.  

define( ‘AUTOSAVE_INTERVAL’, SECONDS ); // Seconds
Where SECONDS is interval at which an autosave will occur.

A word of warning. 

Optimally, you may think that setting AutoSave to a very low number of seconds is the best!  This would mean that even if the power goes out or the Internet becomes unavailable, you haven’t lost any work.  And this is true!

But consider this also, each version that is AutoSaved potentially takes a lot of space.  This might not be optimal.

So then you might consider, okay, just make the REVISIONS a reasonably low count, and your site will be fine again!  Well, maybe.  Consider it this way.  If REVISIONS is set to say 15 (which sounds like a reasonably high number), and AutoSave is set to 60 (seconds), then regardless of whether you have explicitly saved a copy of the page, the revision history disappears after fifteen minutes.  

That might not be optimal for you.

I don’t have a magic answer for you here, other than to say, be aware.  For me, I’ve set my AUTOSAVE to 120 seconds (I normally save more often than this). and I’ve set my REVISIONS to 50.  In my case, I’m running my own server farm, and I have potentially unlimited database space, so retaining many revisions is not a big deal.  Your situation may be different.

Registering a domain

Domain name

Branding, Searching, Buying, Building… You are likely here because you want your very own domain name.  That is great news, and I’m here to help!


A domain name (also known as a URL, Uniform Resource Locator, or web address), is the unique way for the world wide web to know you.  Each URL is a branding, a brand name where others can find you.  Inasmuch, the brand should be unique, and memorable.  

Consider, what are you tying to convey?  Is it that you want people to find you as a person, or is it that you are selling something?  Ideas for branding might include:

  1. Your name.  Like this domain, marksatterfield.com, it is my name.  It might be unique enough, and descriptive enough for everyone to find you.  But it might not be exactly what you are looking for, and it might not be unique enough for other people to find you.  If your name is a common name, it is likely already taken.  If your name is Mark Satterfield?  Yes, the domain is already taken.  Sorry about that!
  2. Your nickname.  This might be an acceptable domain name, depending on how common your nickname is, and whether it is available.
  3. Have you started a company?  Then use the web address associated with your company.  
  4. Are you selling a book or product?  Then use the name of the book or product in your web address.

The next few steps are going to be iterative.  You are going to dream up the ideal name, only to find out that your ideal name is already someone else’s ideal name and registered.  Then you’ll have to dream up a different ideal name.

Searching for your domain name

A registrar is a company that is authorized by ICANN to register domains.  Once you have a few ideas for a domain name, you’ll next have to check if the domain is available.  This is a bit tricky.  if you search for a domain on the wrong registrar, the registrar might hijack and camp on your domain!  Although no one can prove this happens, I’ve searched for names on GoDaddy, only to go back in the next day or two to find out the domain is then taken. 

My recommendation is to use internic.net for domain searches.  Go to the whois page on internic.net, and enter your choice of domain.  For example, enter “godaddy.com”.  Be sure to use the Top Level Domain nomenclature (the .com, or whatever else TLD extension you’ve decided to use).

If you receive a No Match message, that means your domain is available!  If you receive anything else, that means your domain is not available and you’ll have to go back and search again.

Buying: Registering your domain

Next comes the registration process.  Be careful with unscrupulous registrars who might register the domain in their own name.  I’ve used several domain registrars and have not had a problem.  Google is actually a domain registrar, but other than Google I don’t want to recommend any particular ones here just in case you have an issue.

Building: Setting up your web site

This part gets a little more complicated and beyond the scope of this article.  

Next steps

If you have special requests, or you’d like to have a domain registered and site set up and configured, please reach out to me and I’ll help you out.

Phone power button bootlooper

LG Nexus 5 Bootloop

Is your phone stuck in reboot mode for no apparent reason?  Maybe there is a reason, and there may be a simple fix to it too.

LG Nexus 5 Bootloop
LG Nexus 5 Bootloop

Power button stuck?  Let’s check for that!

If your phone looks to be in a “bootloop” where the phone starts to boot, then shuts itself down, then starts the boot process again, it might be caused by a faulty power button.  


Here’s a test.  Push and hold the power button.  Just hold it.  Does it appear to have the same behavior of boot looping?  If so, then it is likely a power button failure.


If it is exhibiting a different behavior when you push and hold the power button, it could still be a power button failure.  Especially if it boots up fully while pressing the button, it is likely a power button failure.  Why is that?  Because, it should be rebooting constantly with the power button pressed in.  If it is not, then there is a contact issue.


Read the rest of the article here

Disable mouse wakeup

So you are trying to be a good steward of power, and just want your computer to go to sleep — and stay asleep — until you explicitly ask it to awaken.  Is that too much to ask?

Well, no, it isn’t!  And here’s the easy solution.

1. Find your mouse driver

First thing is to find your mouse driver.  As is common in Windows, there are many ways to find the driver.  One way in Windows 7 for example, is to go here:

Start > Control panel > Mouse

2. Find Power Management tab

Go to Hardware > Properties > Change Settings > Power Management

3. Disable wake

Uncheck “Allow this device to wake the computer”

That’s it!  You are done!  Well, almost.

4. If you happen to have a unifying receiver (like a Logitech) or bluetooth receiver, the receiver likely adds both a Mouse and a Keyboard, maybe even more.  If that is the case, you’ll also need to find the corresponding keyboard driver entry using the same technique as above.  Then you’ll be done.

I’ve avoided adding specific images because each installation will be different.


WordPress: Redirect site to subdirectory

So you’ve decided on WordPress as your Content Management System.  Yay for you!  WordPress is a great choice.  This article will help you organize your directories & files, and help you help your users navigate your site from the root domain URL.

Install WordPress in Sub-directory

First this first.  As you complete your first installation, be sure to create a sub-directory for the WordPress installation.  There is no need to litter your home directory with a bunch of WordPress files.  After all, that was the whole idea behind hierarchical file systems.

Let’s say you choose “wp” as your WordPress installation directory.  Once you’ve completed your installation, users who visit your main page url will likely wind up with a directory listing, something like the Index Of image below.

Index Of directory listing after WordPress installation
Index Of directory listing after WordPress installation

Of course, that isn’t what you are looking for.  You want your users to land on your WordPress instance.  Let’s take care of that.

Modify .htaccess

Next, we’ll update your home directory to point to WordPress installation

  1. WordPress is already installed in it’s own private directory (wp in this example).
  2. Edit the .htaccess file (don’t forget the leading period) in your root domain directory (/) by adding the following:
    # 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]
    # END WordPress

Create index.php

Next thing, create the /index.php file in the root URL directory

 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 * @package WordPress
* Tells WordPress to load the WordPress theme and output it.
* @var bool
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );

Clean up Wordpress

Before we take this step, go to your URL.  You should notice the WordPress instance, but if you look at the URL it has been modified to include the sub-directory in the URL itself.  Not likely what you wanted.  The last step is to clean up your URL.

Log into your WordPress instance, go to the following
Wordpress >> Settings >> General

You will notice two URLs,

  1. WordPress Address (URL).
  2. Site Address (URL).

Change the Site Address to http://www.yourdomain.com (that is, remove any sub-directory information listed).


You are all done!

Happy pressing!

Reference documents

  1. http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Pointing_your_home_site.27s_URL_to_a_subdirectory
  2. http://codex.wordpress.org/Changing_The_Site_URL

Take ownership of a file in Windows

Have you ever had an issue deleting or otherwise owning a file in Windows? Well, I have.

Here are some ideas on how to own a file.  Take each step by step.  If #1 doesn’t work, move on to #2.

  1. Try to delete the file in windows explorer. Of course, this is the “easy” way. No can do? How about…
  2. Try to change permissions on the file first, using the right click/properties/security tab.
  3. Still no love? How about trying to delete this file from the command prompt.
  4. Next, try deleting the file from the command prompt that is running as administrator (start-cmd then right click, run as administrator)
  5. Will safe mode work out? Try to reboot into safe mode. This will remove all file handles that are attached to the file, any programs that are using the file will be closed. This will work if the file is opened for use by another user or program.
  6. Finally, this should absolutely work.
    * Boot into safe mode (which removes the dependency of other programs using the file)
    * Log in as Administrator
    * Open a command prompt
    For files:
    C:\> takeown /f file_name /d yicacls file_name /grant administrators:F
    For directories and recursively, all nested files/directories:
    C:\> takeown /f directory_name /r /d y
    C:\> icacls directory_name /grant administrators:F /t


<Originally posted 25/October/2011 on blogspot>
( External reference: http://www.mydigitallife.info/delete-undeletable-files-in-windows-vista/comment-page-1/#comment-938578 )