1

We moved the site to HTTPS recently (for the most part following this guide: https://www.bram.us/2014/12/06/migrating-your-wordpress-website-from-http-to-https/ )

Now, most things are working perfectly - with the site loading as HTTPS and having the green icon on most pages. (The site name has been updated to reference the change.)

But all of the permalinks (at the top of editing page/post) still show as http. And with a password protected page, entering the password isn't loading as it's still trying to access it via http.

I've changed the link to HTTPS in:

  • Settings>general
  • in wp-config.php:define ('WP_HOME','https://example.org.uk'); same for WP_SITEURL

  • In PHPMyAdmin (changed under siteurl and home in the wp_options table)

Why might this be, and what can I do to alter it?

Edit: I have tried saving the permalinks again, no change

  • Are you using cloudflare or any caching plugins? – Austin Apr 24 '17 at 14:40
  • We are using WP Super Cache, however with the cache cleared and the plugin deactivated the problem persists – abba2566 May 9 '17 at 11:49
1

If you are using Apache as your web server then add

# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https 
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

in your .htaccess file, this can be found in the root wordpress directory. Alternatively you can use WP Force SSL plugin.

  • No result from either – abba2566 Apr 25 '17 at 8:33
0

Did you cleared (resaved) your permalinks?

Settings -> Permalinks -> Click on "Save Changes"

  • Yes, sorry I should have mentioned that in the question! – abba2566 Apr 24 '17 at 11:37
  • 1
    You could search the entire database for http:// and replace it with https://. If you are allowed to install something on the server (and you know how to do it) you could use wp-cli to perform this task. The command would be: wp search-replace --all-tables "http://www.example.com" "https://www.example.com" – ahendwh2 Apr 24 '17 at 11:47
  • That might be worth looking at - I'll give it a go and let you know how it goes – abba2566 Apr 24 '17 at 12:05
  • Another vote for WP-CLI. It makes life so much easier. – Pat J Apr 24 '17 at 12:50
  • Installed wp-cli and ran the command you suggested - no change – abba2566 Apr 25 '17 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.