Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wordpress CLI 4 36
css question 1 49
Put some white space between images in WordPress footer content 2 50
WordPress Themes 10 34
In Part I (http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_8410-Getting-Started-In-WordPress-Part-I.html), I introduced you to the powerful WordPress backend, the WordPress administrative Dashboard.  In Part II, I will introduce yo…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

867 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

16 Experts available now in Live!

Get 1:1 Help Now