Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-07-21
4
Medium Priority
?
947 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
Transferring a wordpress site from a host or local dev server to another host can be a pain. So I've included my steps on how I have accomplished this task. Steps include an assumption that you have Cpanel access or Ftp access.. If you do not hav…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

927 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