Solved

How to alter WordPress site to allow both http and https URLs

Posted on 2014-07-21
4
524 Views
Last Modified: 2014-07-23
I have two WordPress websites I have been working on for a few months. Now, I need to install an SSL cert on each (already done). However, the sites are full of http://www.domain.com references (CSS, images, fonts, etc.). So the pages are mis-loading in a big way.

What is the best practices, industry standard way to handle this, these days? Full URLs are one thing, but obviously I need to be able to control http vs. https in order for the site to work properly.

Thanks!
0
Comment
Question by:bbdesign
  • 2
  • 2
4 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 40210533
Easiest way to do it from the WordPress perspective is install The WordPress HTTPS plugin: http://wordpress.org/plugins/wordpress-https/ and tell it what content to make secure and it will do so and it should correct any calls to insecure content from the page/post in question.

To answer the broader question of best practices, there are a couple.  The first is to plan for security and not add it at the end of the process...makes life a lot easier.  The second is to use // instead of http:// or https:// when calling CSS or JavaScript files and that will provide future compatibility with SSL if added later.
0
 

Author Comment

by:bbdesign
ID: 40211243
I'm going to attempt to fix things in the theme files rather than rely on a plugin. But when I change this:

<link rel="stylesheet" href="http://www.berksfoods.com/wp-content/themes/avian/assets/fonts/franklingothicfs_mediumcondensed_macroman/stylesheet.css" />

...to:

<link rel="stylesheet" href="://www.berksfoods.com/wp-content/themes/avian/assets/fonts/franklingothicfs_mediumcondensed_macroman/stylesheet.css" />

I see in my console:

"NetworkError: 404 Not Found - https://www.berksfoods.com/:/www.berksfoods.com/wp-content/themes/avian/assets/fonts/franklingothicfs_mediumcondensed_macroman/stylesheet.css"

Did I do something wrong? Thanks.
0
 

Author Comment

by:bbdesign
ID: 40213844
Whoops, I think you meant to write that I should use // and not ://
Just a typo?
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40215050
Just a typo?

Usually is.  I'm so conditioned to typing http:// that when I go shorthand, I screw it up in all sorts of interesting ways.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you are looking for plug-ins to add functions to your WordPress small business web site, take some time to read though this comprehensive list.  These are all the plugins I use for my customers WordPress web sites, as well as my own.  Be sure to …
WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now