Plugin Author
Mark
(@markwolters)
Hi Keit,
possibly your site uses a plugin or has a function in your theme’s functions.php file which forces the site- and home-url back to http://. Can you try to temporarily disable other plugins to see if that does allow you to change the urls to https://?
Mark
Thread Starter
keidla
(@keidla)
Yes, it worked. Now my url is https, but if I turn on my plugins back, the page disappears and Pages NOT Found and my url is back http.
Plugin Author
Mark
(@markwolters)
Pages not found can be caused by a number of things, usually re-saving the permalinks twice in the Settings->Permalinks menu will solve this issue. If it doesn’t, please see https://really-simple-ssl.com/knowledge-base/404-pages-wordpress-site-migrating-ssl/ for the most common causes and solutions of a 404 error.
If the site and homeurl are being set to https:// with all plugins disabled, the issue is caused by a plugin conflict. To find out which plugin exactly you can disable other plugins one by one.
Thread Starter
keidla
(@keidla)
I solved the 404 error, but if I turn back my plugins the site and homeurl are back set to http and if I turn them off, nothing will change anymore. Still http.
Plugin Author
Mark
(@markwolters)
There must be something that’s changing your home and siteurl back to http://. It’s also possible these are defined in your wp-config.php file. However, that should grey out the fields in your general settings so it’s unlikely that’s the cause. It doesn’t hurt to check if there might be a define home- and site-url in your wp-config.php file.
Other options are a must-use plugin which updates the urls to https://, or a theme that uses update_option to updates these urls to http:// on each pageload. Can you check if your site has any must-use plugins (in the /wp-content/mu-plugins/ folder) and try to switch to a default theme to see if that resolves the issue?
Thread Starter
keidla
(@keidla)
My wp-config.php looks like this:
-
This reply was modified 6 years, 7 months ago by
keidla.
Plugin Author
Mark
(@markwolters)
Hi,
the wp-config.php file contains confidential information like the database username and password, I’d suggest to edit that information out or remove the contents of your wp-config.php file entirely from your reply.
Your wp-config.php doesn’t contain a define for either the home- or site-url so it is not causing the issue. Did you try to temporarily switch to a default theme yet?
Mark
Thread Starter
keidla
(@keidla)
I removed it :). I switched to another theme and manually changed the site url and got to save it. So it means that it’s still related to this specific theme? I switched back to my home theme and again the https changed to http and can’t save the settings.
Plugin Author
Mark
(@markwolters)
Yes, that indicates that your theme is overriding the home- and site-url settings. You can contact the developer of the theme about this, they can come up with a fix or explain why the theme behaves as it does.