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.

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.

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

Is your website an open door or a maze?

An open door or a maze?

bigstock-Business-man-in-front-of-a-hug-40875844Did you know that your website only has 2.6 seconds to make an impression on viewers, or your customers? So are you providing an open door or a maze to your potential customers?

There are more and more people browsing the web on their smartphones and that number is growing all the time. It’s expected that mobile web browsing will outstrip desktop internet use by 2015. Will these mobile browsers be able to easily see your website or do they have to zoom to view the content that is not readable on their smartphone. Or will they move on to the next site that comes up in the Google search. Continue reading

Newspaper Advertising vs. a Website

Advertising in a newspaper or having your own website? Which is the better value?

I wish I had a dollar for every business person who said that websites are too expensive to have done. Yet many of these businesses take out full page ads in their local newspaper and some of the major ones. And a website is too expensive – really? Continue reading

When considering SEO, don’t forget HEO

SEO

SEO stands for Search Engine Optimization, the process involved in ensuring your website is found by search engines. It involves the wording used in titles and other content both on the front end, the part seen by viewers and the meta data which the search engines also view. Many people think that they need to repeat their important search term or keyword over and over again to the point the human reader just gets annoyed. Continue reading

Professional WordPress Development Reduces Risk

Why Should I Care?

As a website owner you control how your site is developed.  Your choice is between quick, easy and risky or professional, reliable WordPress development.   You may not care much about the process your developer uses, all you want is that your site is built quickly, correctly and cheaply.  You’re sure the developer will get it right.  WordPress makes it easy for inexperienced developers to build beautiful sites with advanced functionality. Continue reading