Enabling HTTPS in WordPress

An Upsurge in HTTPS Adoption

I recently had a few calls to help designers enable HTTPS (SSL / TLS) on WordPress sites.

Recent advances in free and self maintaining SSL certificates such as Lets Encrypt have opened up the use of secure connections to site-owners, web-masters and site-builders who are not developers or network administrators. These tools make obtaining and enabling the SSL protocols much easier and cheaper than it was in the past. Many hosting plans, e.g. SiteGround, now include SSL as a standard feature and include tools to enable SSL for your site.

I’m not going to discuss the benefits of SSL and HTTPS, that has been covered extensively elsewhere. Nor am I going to try to convince you to convert, if you are here you are probably already deep into a conversion and possibly wondering if it was a bad idea. It isn’t a bad idea, but it can be tricky.

The Problem

Telling WordPress to use HTTPS is easy if you are building a new site, but doesn’t quite work on an existing site. There are numerous resources that will tell you to just set the WP Address and Site Address values in Settings and you’re done. This will work if you don’t have any page links in your content or any images or documents. It’s a rare one page site that doesn’t have these.

WordPress uses fully qualified URLs for links within the site, so an image source is likely to be

http://example.com/wp-content/uploads/2017/05/my-photo.jpg

WordPress will attempt to fix these, but doesn’t get them all. This will cause the dreaded “mixed content” warnings and turn off the lock badge after you convert to HTTPS. These need to be converted. Such links can be found in the database and in the theme’s CSS files.

Some articles suggest using a search and replace to fix these. That won’t work if any of them are inside “serialized data”, you should use a plugin like WP Migrate DB, Backup Buddy or the Interconnect/IT Search and Replace that understands that format.

The Process

This process assumes you are comfortable editing system files like .htaccess and wp-config.php, making database backups and importing a database from a backup as well as WordPress maintenance tasks. No programming skills are needed.

  1. put your site in maintenance mode, this is especially important if you have e-commerce since you don’t want to lose orders when you import the database
  2. backup the database, I use the WP Migrate DB plugin, but this could be done with PHPMyAdmin or mysqldump
  3. backup the wp-config.php file
  4. backup the .htaccess file
  5. backup any .css files that have http: in them
  6. set the WP Address and Site Address values in the settings
  7. create a new database with the same user access as the existing database, you can find the database name in the wp-config.php file.
  8. convert the database to use HTTPS. This can be done using WP Migrate DB by setting the URLs to change http to https.
  9. import the converted database dump into the new database. You now have two databases, one with http and one with https.
  10. change the DB_NAME value in wp-config.php to use the new database
  11. add the line
    define('FORCE_SSL_ADMIN', true);

    to the wp-config to force the admin to always use HTTPS.

  12. save the wp-config.php
  13. add the rewrite rule to .htaccess
    # force https for all pages
    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    

    This is the simplest version of the rewrite and will apply https to all URLs within the site. If you have subdomains that won’t be using HTTPS yet you will need a more complex rewrite condition that tests for the main domain.

  14. test the site looking for mixed content messages
  15. fix any CSS files manually
  16. remove the maintenance mode

If you follow these instruction carefully you will have a fully converted site and sufficient backups to revert to HTTP easily. Best of luck and happy encrypting.

An Alternative Approach

If your courage and skill set are a bit more advanced there is a quicker, but slightly more hazardous way to do this. It involves a different set of database tasks.

  • back up the database
  • install interconnect/it Search and Replace in a folder on your hosting
  • read the Search and Replace documentation!
  • navigate to YourSearchReplaceFolder on your site to update the database in place.

WordPress Maintenance for Beginners

March 28th Meetup

I hosted a session at the WordPress London meetup on March 28th where we discussed the topic of WordPress Maintenance. The updated handout is under the May 23rd Meetup.

April 25th Meetup, Design Basics

Next month, Donna Todd presented Design Basics for WordPress on April 25th.  See the Meetup listing at https://www.meetup.com/WordPress-London/events/238247494/. She has posted an audio recording of the meetup.

May 23rd WP Maintenance Part 2

The May 23rd handout is an update of the March 28th version and is available at WPMaintenance102

Five Top Mistakes of DIY Websites

are diy websites worth the time, money and effort?

Pitfalls of DIY (do it yourself) websites

Many people think that they can do their websites. There are many areas where DIY sites may hurt more than help your business.

Here are five of the top mistakes that are often made when people do their own websites.

1. Feeling you “Have” to use WordPress or even a CMS at all

The most commonly used content management system (CMS) is WordPress. It’s also the CMS that has the most hacking attempts made on it.

Many people think that everything used to create a WordPress site is free. And it used to be – but recently more and more themes (look of the site) and plugins (little programs that perform specific functions on the site) now cost money – often in the form of yearly subscriptions. They may do almost what you want but not exactly. There are many free versions, but their functionality is limited and encouragement to buy or subscribe is high.

Is it cost-effective for you?

Consider if a CMS something you even want? Do you want to spend time creating and updating your site or would you rather have a professional help you manage your site while doing what you do well which earns more money?

2. Choosing Templates/Themes based on looks or cost

Templates or themes look wonderful on the demo. However customizing the designs often requires more skill than the average person possesses.

These packages are also often heavily coded which makes them bulky and slow to load. This can impact your site’s SEO (search engine optimization).

3. Poor organization of the site

Is your information presented in an organized way or is everything on one page? Consider a retail store. If you walked into one and everything was in a big pile, would you spend time sifting through the stuff to find what you wanted? Of course not, you’d probably go to the store down the street that has everything organized into departments.

It’s a much better plan your site in a structured way to make it easy to navigate.

4. Forgetting about Search Engine Optimization (SEO)

“Build it, and they will come” worked in a movie. But unless people know the address of your website, poor SEO will make your site difficult to find.

For example, if you own a restaurant, is your menu in text or is it a scan of your menu. Search engines can’t “read” an image. In this case, a picture does not tell a thousand words.

5. Forgetting how people are looking at your site

Your website is a brochure but it shouldn’t be laid out like a paper brochure. A website that looks great on a large computer monitor, may be impossible to read on a tablet or smartphone. A large percentage of people are viewing websites on small devices now, and this number is increasing daily.

Are you feeling out of your depth?

At Silver Maple Web we can help with the feeling of being overwhelmed you may have in this area.

For example, if you know that you are probably never going to have the time to update your website yourself, maybe a CMS isn’t what you need. For example, you may only want to update your blog regularly (and you should). We can design a site for you that looks amazing with blog capabilities that may be less appealing to hackers.

If a client wants to have their site done in WordPress, we are happy to do it, but we will also provide other options.

We write code – we don’t just take a theme or template and tweak the colours and fonts.

A properly coded site is “lighter” and loads faster. For example, a plugin that has several hundred lines of code could be accomplished with a fraction of that when coded by an experienced programmer.

We ensure that your site is set up in a search-engine friendly way.  If you want to manage your site’s content, we will coach you on what and what not to do.

We know that people are looking at your site on multiple types of devices, so we develop your site with that in mind.

The Story of Mary – a case study

If you are feeling out of your depth, you don’t have to be alone. Consider the story of one of our clients, a graphic designer, let’s call her “Mary”.

Mary is an amazing graphic designer, and she does excellent work for her clients. We met Mary at a WordPress meetup in Toronto. She was trying to learn how to code her website. Her husband found her in tears over her computer one night. She was having a hard time doing the coding. He suggested she invest in someone who knew how to do that work and she called Silver Maple Web.  We worked together to get her website together, and it was the start of a terrific business relationship. We have worked together on many projects since then.

Like Mary, you are probably an expert in what you do. But web development may not be one of those things. You are okay with a hammer and nail when you want to hang a picture on the wall, but does that mean you have the skill to build a backyard deck?

The Bottom Line

If you are ready to have a website that doesn’t look like everyone else’s and have it done by a professional so you don’t find yourself sitting over your computer crying like Mary, give us a call at 519-439-5981 for a free consultation.

While we’re building your website, you can be off doing what you do a great job at and increasing your company’s bottom line.

And if you are doing your own website and get in over your head or hit a roadblock where you need help, we’re here for you. We often help people who have found that they reach a certain point with their website and can’t go further.

Wrapping Text around an Image in WordPress

Many clients who have a new website and are new to WordPress often have trouble with images in posts and pages. They usually are able to upload and insert an image but the image is often above the text when they wanted it to be inline with the content.

Here is a short video that illustrates how to position the image on the left or right so that the text wraps around it.

The Silver Maple Web Advantage

Do you want your website built with WordPress so that you can easily update it yourself in the future? WordPress is a good content management system, but there can be issues with using plug-ins as part of the development.

  1. Plug-ins are often developed by students or developers who are creating them on a part-time basis – if they stop updating and maintaining them for any reason, the plug-ins may stop working when WordPress is updated, which could render parts of your website inoperable – and the original developer may no longer be available.

  2. Plug-ins are often generic – they may achieve PART of what you want to achieve but not quite everything.

  3. Most free plug-ins are like samples, to get full functionality you may have to spend more money for a “full-version”. You may also be required to pay a yearly fee for updates.

 So how is Silver Maple Web different

Unlike many “web developers” in the market, I am an experienced programmer.

What does this mean?

  • I can customize plug-ins to get the exact functionality you need to achieve the result you want.  I can also fix a plugin that stops working after a WordPress upgrade.

  • In many cases what some plug-ins do can be done with a few lines of code built into the CSS or PHP of your theme.

  • I have experience writing WordPress plugins. Chances are if you need a specific functionality, others probably do as well. I can write a custom plug-in for you. If it’s something that other web site owners will benefit from, the cost to you will be minimal as it will be a plugin that I can share with others in the WordPress plug-in repository.

  • I write themes, I don’t just modify an off the shelf theme or add a child theme.  I can build a theme to your exact specification.

 So when you are looking for the right person to develop your website, show them the information above – ask them if they have the Silver Maple Web advantage. Do you want a website that “sort of does what you want” or does “exactly what you want”.

Ask prospective developers how they will handle the challenge of getting you back on-line if one crucial plug-in fails after a WordPress update and the original developer has moved on.

 You are going to be in business for a long time – make sure your website has the staying power you need.

 

Is your website development like making sausage?

Like sausage, do you want people to watch your website being made?

is your website development like making sausageHow would you feel if a guest came to your barbecue and said they’d bring the hot dogs or sausage? Pretty good right? Okay, if said guest arrived with all of the materials to make the sausage and meat grinder and proceeded to make the sausages in front of you and the rest of your guests how would you feel? Not so good, right?

Yet, many people let “developers” build their content management website live, on-line where potential clients can see the website in progress. They may see a coming soon message on the front page, links that don’t go to anything, links to pages that have “lorem ipsum” content. It’s kind of like watching sausage being made.

There are some things that people shouldn’t see being made – sausage, cat food, canned chicken, fish processing – and your website is one of those things.

It isn’t the most professional form of website development.

Professional website development involves:

  1. your developer building your site first on their computer,
  2. moving it to a private “staging area” that only you and your developer have access to for review, tweaking and approval and then,
  3. taking it live on the server at your web hosting service where it is now visible to search engines and the world.

It’s kind of like your guest bringing the sausages ready-to-cook and throwing them on the barbie where you and your guests can savour the scent and hear the sizzle of the cooking sausages just before you enjoy them.

Silver Maple Web promises you professional website development. No one is going to see your website until you feel that it is ready for your customers and potential customers to view. And we think that’s a pretty tasty prospect.

Simple Matted Thumbnails Plugin

We have released a new plugin, Simple Matted Thumbnails. This provides a new format for thumbnails in addition to the two that come with WordPress.

Thumbnail Formats

Proportional

This is the default.  The image is resized to fit in the box, the resulting thumbnails will vary on size if images with different aspect ratios are used.
proportional

Cropped

This is a choice available from the media settings for the thumbnails and in the settings of many e-commerce plugins.  The image is cropped to the exact size requested, care must be taken in preparing images to avoid losing important content.
cropped

Matted

This is the new format provided by this plugin.  The image is resized proportionally to fit in the box and then matted out to the size requested for the thumbnail.  The mat is similar to those used to frame photographs and watercolours.  This plugin lets you choose the colour of the mat and add extra matting around the thumbnail image.
matted

Matted with extra matting

This adds a percentage of background colour around the image. extra

Where to Get The Plugin

The plugin is available from the WordPress Plugin Repository at http://wordpress.org/plugins/simple-matted-thumbnails/ and using the Plugins menu in the WordPress admin.  Please let me know of any issues using this plugin and any enhancements that you would like to see.

CSS 102

A CSS introduction for designers – part 2

This is the second in a series of short CSS courses for designers and other non-programmers.  These are presented as part of the GTA Mac Users Group. The classes consist of a handout, presentation, demo and questions and answers. These classes are directed toward designers who may need to use CSS occasionally and to those who wish to get started with CSS, no programming experience is required. Continue reading

Is your website fresh or stale?

Is your website fresh or stale? Is it an 8-Track Tape or a MP3We meet people all the time, whether they are service providers or networking contacts and when they hear we do web development they say, “oh, I have a website; it was built 15 years ago so we don’t need one”. When asked when they last updated it, they have a puzzled look and say “update? not since it was done”.

Really? A 15 year old website is promoting your business online – that is if people can find it – because I guarantee you that if your website is 15 years old and nothing has been done with it since it was released, search engines are going to have a hard time finding you in a Google search. Not having fresh content gets you pushed down in search results. Continue reading