Change Blog “Posted On” Date To “Last Updated On” Date in WordPress

Over the years you may have published a large number of blog posts.

If there are posts that are more than three years old, you may find that some of the content on those old posts is no longer valid and needs to be updated.

On WordPress, you can do this easily. All you need to do is to go into the “Edit Post” mode in WordPress, change your content, and hit “Update” to have the new content show up.

The problem with this approach is that WordPress still shows the original post date to the readers. This is usually not what we want because users may look at the old date and quickly assume that the information contained there is out of date, and that is exactly the opposite of what we want.

Continue reading

Composite Key In SQL

Composite key, or composite primary key, refers to cases where more than one column is used to specify the primary key of a table. In such cases, all foreign keys will also need to include all the columns in the composite key. Note that the columns that make up a composite key can be of different data types.

Below is the SQL syntax for specifying a composite key:

Continue reading

Migrating From HTTPS To HTTP


Why Migrate From HTTPS To HTTP

While moving from HTTP to HTTPS is a growing trend, there may be a time when you want to convert HTTPS to HTTP. For us, the main driver was page load time. After we migrated to HTTPS, the average page load time went up substantially, thus negatively impacting user experience. We tried several methods to improve page load time, but found little success. As a result, we decided reverting to HTTP was the best way to proceed.

Do I Still Need an SSL Certificate After Migrating From HTTPS To HTTP?

Continue reading

WebPageTest Error With HTTPS / HTTP2 Enabled Site


One situation I ran into when I migrated to HTTPS with HTTP2 enabled was that I had an issue with the page load speed testing tools WebPageTest and GTMetrix. On both tools, failed to load, yet when I visit the site using a browser, the website loaded up fine. This is the first time I have seen a difference in behavior between these types of testing tools and a browser. Given the highly unusual nature of this difference, I decided to look into the issue further. Below is what the test result page on WebPageTest looked like:

WebPageTest Error Result Page

Continue reading

WordPress Permalink Stops Working

I recently migrated to a new Linux server with a different version of Apache, and for a while I could not get the WordPress permalinks to work. After a lot of trial and error, I figured out what the problem was, and I hope the information I share here will help someone in the future.

Below are the relevant system information:
OS: Ubuntu 14.04 LTS
Web Server: Apache 2.4.18

What was the initial symptom?

The home page of the blog loaded OK. However, when I clicked on any link to go into any post, category, or month, I got a 404 error.

For those of you who wants to know the answer right away without reading through my journey of getting there, go to the Fix section.

Things I tried

I tried a number of ways to resolve this issue. They were as follows:

Continue reading

Convert From HTTP to HTTPS Using CloudFlare SSL

I recently converted a website from HTTP to HTTPS using CloudFlare’s Universal SSL, which is free and does not require installation on the server, two factors that had prevented me from doing this previously. Here are the steps I took to convert my website to HTTPS:

1. Update all internal links to point to the HTTPS version of the asset. This includes the following:

  • Canonical URL
  • Internal links
  • CSS
  • Javascript
  • Images
  • External CSS resources such as Google fonts

Depending on how complex your website is, this effort could range from a few minutes (if you have a very small website) to a big project that takes several months (if you are a large enterprise). However, if you belong to the latter category or if you are doing ecommerce, it is a good idea to go with one of the commercial SSL certificates rather than getting SSL through CloudFlare.

Continue reading

How To Convert Tape To Digital Format

I have a collection of over 200 music cassette tapes, and I have been going through the process of copying the contents of these tapes into digital format and storing them on my computer. This process is fairly straightforward, but it does take time. At the high level, what you need to do is to use a software program to record the music on your computer by playing the cassette tape in a tape player and connecting the tape player to your computer. Then, you can store the music on your computer in your favorite format.

Materials Needed

1. A cassette tape player.

2. A 3.5 mm male-to-male audio connector such as this one from Amazon.

3. An audio editing program called Audacity. You can download this program from the website.

Detailed Steps

1. Plug one end of the audio connector into the tape player, and the other end into your computer.

Continue reading