Solved

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

Posted on 2014-07-21
4
618 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

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…
Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
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 prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

786 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