Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-07-21
4
Medium Priority
?
886 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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 …
WordPress is constantly evolving, and with each evolution appears to get better and better.  One of the big drawbacks prior to version 3 was that there was no way to be able to set up a custom menu from the backend. The Old Way Adding menus is…
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 set up the permalinks on a WordPress Website. 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 : Go t…
Suggested Courses

719 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