So I recently, built and LAMP server and installed wordpress on it. I connected it to the web via a reverse ssh tunnel using serveo.net. I decided to add ssl and the rest of the website seem to work fine, but wordpress keeps breaking when I try to use ssl. I went to the general settings and changed the urls to http instead of https, but when I load the pages, in the source code the css and js urls are using http instead of https, so they won't load. Then wp-admin part won't even load. How do I fix this? I've looked at quite a few posts about people having similar problems, but none of them helped.


Check two things:

  • in the wp-options table, the site URLs (in two places) should be the full URL, as in https://www.example.com .
  • check the site's htaccess file for proper rewrite of http to https.

For a htaccess rule, this one works in most case:

RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Then look at your theme files to ensure that any references to CSS/JS include the https protocol, not http. Most well-written themes will use relative rather than absolute references to files to include.

It's also possible a plugin might be specifying http rather than https.

Use the Network tab in Developer Tools (usually F12 in your browser) to look at each request to see where it is coming from. If the request is to a plugin folder, then check the code in there.

  • I'm using the default theme. twentynieteen,I'm using the default theme. twentynieteen. The database entries are correct, but the head section has stuff like <link rel='stylesheet' id='wp-block-library-css' href='jtjumper.serveo.net/wp/wp-includes/css/dist/block-library/…' type='text/css' media='all' /> <link rel='stylesheet' id='wp-block-library-theme-css' href='jtjumper.serveo.net/wp/wp-includes/css/dist/block-library/…' type='text/css' media='all' /> – John Tippin Feb 3 at 23:29
  • If I look at the page source on my test (hosted) site with the 2019 theme, the href for those statements includes the https: protocol. And I have the htaccess shown in my answer. And my wp-options table contains example.com , not just www.example.com . Perhaps yours is not set up that way? – Rick Hellewell Feb 3 at 23:39
  • There's not enough space in the comments for the source but this is the link for the page jtjumper.serveo.net/wp my wp-options table has both, which are both https – John Tippin Feb 4 at 0:06
  • Do you have some caching plugin? Is your htaccess rewriting http to https? – Rick Hellewell Feb 4 at 1:03
  • the only plugins I have are akismet, loginizer, realy simple ssl, and wordfence – John Tippin Feb 4 at 1:22

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.