Moving Wordpress from Http To https - php

I have recently moved my WordPress website from HTTP to HTTPS.
But when i load my webpage with HTTPS the stylesheets doesn't load due to mixed contents . what are the changes i need to do to get it work.
I am using AWS Certificate manager with ELB .
I followed this tutorial and now my admin panel is not loading as well with an error of ERR_TOO_MANY_REDIRECTS
Please Assist

Make sure all of your CSS links are called with HTTPS. Check your console, it will tell you which url are problematic.
Make sure all of the links in your .css files are in HTTPS too, or relative path (background-image urls, fonts urls etc.)
Try to use this Wordpress plugin, it will fix all of yours links.

Related

Wordpress - Remove https redirects for media files after moving to localhost

I moved wordpress website with https address to a localhost on LAMP server using All-in-one migrate plugin. Everything moved well except paths to media files (pictures).
Links to pictures in upload folder are broken. And nothing wrong with them except that they have https instead of http.
Console errors pic
I tried find/replace in wp_posts table, but it doesnt find anything. Tried to use plugin, that seems to do the same - doesnt help.
My .htaccess file is the default one from WP codex.
Weird, that I've done same process of migrating from https to localhost with another wordpress website and everything was fine.
The only difference between them, is that website with problem is using woocommerce plugin. And images are actualy products images. Maybe this will help.
UPDATE: Looks like problem is with all uploaded media files. I just've uploaded new file, and it's not showing neither. Some problems with apache configuration?
UPDATE2: Found out that this is 301 redirect problem. But where does it comes from? What to do to cancel those redirects? Do I need to edit .htaccess?
Screenshot of network tab for correspong images. Gray ones are http versions and red ones - are redirected to https
There are a few things, that I would recommend you to check.
Check your settings in the database _options table in the fields siteurl and home. You should have there http://domain-name
Also you need to check your wp-config.php. There might be rules added regarding siteurl and home using incorrect protocol.
There might be some plugins installed, which can trigger this https redirect, such as Really Simple SSL, or cache plugins, which also have settings regarding https.
And finally, check your theme code, if it is a custom theme, it also can be configured to use https in some cases.

Why https works only on main page? (Wordpress)

I can enter to my site by typing, for example: http://home.com or and it works good, but if I go to https://home.com/example , syles and links (no imgs) refers to http, also the ssl certificate doesn't aprove.
P.S. I use header.php tamplate for home and other pages
p.s.s. Also i change addresses in admin-panel and DB
Sorry for my English!
If you do not use Cloudflare you can use the plugin: WP Force SSL, so that you redirect all the files (CSS, JS, etc) to https.
What I would do is put the site behind Cloudflare and make a page rule to always use HTTPS by default, that should take care of it by enforcing SSL.

Joomla Force SSL in Entire site except 1 page

I have purchase and installed an SSL certificate on my server and everything seems to be working correctly.
I selected in Joomla Global Configuration -> Server -> Force HTTPS -> Entire Site. Now the site all works with SSL as expected.
But, I have 2 pages that needs to be in http because the remote call does not support https :(
I have been fiddling with joomla native .htaccess but I either get redirection loops or errors.
Could someone please help with the correct .htaccess code for force http in 2 pages?
There is a component that can be used to enable https on specific pages of website only. Check this https://extensions.joomla.org/extensions/extension/site-management/url-redirection/yireo-ssl-redirection/.
This will make your work easy no htaccess required.

How can I force woocommerce to use https in all urls?

I have purchased SSL certs and done all the necessary work to get the cert files onto my server and into my apache config files for my virtualhost.
In WP in the backend I have made sure my urls all use https: in them and forced the wp backend to always use https. This all works fine but issues start happening on some pages where it says that it cannot be found giving a 404 error and specifically on the woocommerce /cart and /checkout pages which is really bizarre.
I have even stripped out the settings to force https in site urls and gone straight into .htaccess and forced https throughout the whole site and even still I get errors on /cart and /checkout.
I have permalinks in WP set to custom and custom base url of /shop in woocommerce.
Has anyone else had this issue with woocommerce?
Thanks

Tunneling through ngrok strips wordpress site of styles and theme

I have a wordpress site on an IIS at localhost. To demo the site, I used ngrok to make the site available.
When viewing the site on localhost, everything looks fine. However, when I view the site remotely through the ngrok tunnel, the content appears, but all style & theme elements are lost.
I am not sure what code, configuration or documentation would be helpful for solving this problem.
Any idea why this may be occurring?
This happens because the links in wordpress are usually absolute, you need to force Wordpress to use relative URLs with one of those plugins:
https://github.com/optimizamx/odt-relative-urls
http://wordpress.org/plugins/relative-url/

Categories