Stiffler
Stiffler

Reputation: 23

Wordpress menu items are not https links

I want to use https instead of http on my wordpress site. The site is now running https and there is only one problem.
short facts of my past steps.

Now the issue. My site works over https with every page but the wordpress site generate for the menu only http links. There are 3 menues of the site and every menu has only http menus. Why? How does Wordpress generate these links?

Upvotes: 1

Views: 2946

Answers (4)

In case you never figured it out, I just did after encountering this issue lately and finding this question.

In current WP admin go to Settings > General. Then simply add s after http.

enter image description here

Upvotes: 4

Tony Hensler
Tony Hensler

Reputation: 1492

Have you thought about using:-

https://en-gb.wordpress.org/plugins/wp-force-ssl/

This will force all of your internal links to use https://

It's the same as @SergeyAn answer but you don't have to edit the .htaccess file directly.

Upvotes: 0

SergeyAn
SergeyAn

Reputation: 764

You can try to use htaccess rules like this:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Upvotes: -1

rnevius
rnevius

Reputation: 27102

Based on the actions you have already taken, there are two possible cases (assuming your menus haven't been defined by a plugin):

  1. Menu links are improperly hard-coded in template files.

    • If this is the case, you will need to find the relevant template files in your active theme (or create a child theme) and edit them. The proper way of defining hard-coded links in this case (if they must be hard-coded) is to use template tag functions such as site_url(), which will automatically prefix links with the proper scheme and URL.
  2. Custom links have been defined in menus, in the WP-Admin.

    • If this is the case, you can head to WordPress Admin --> Appearance --> Menus and edit the custom links in each of your menu items.

Upvotes: 0

Related Questions