Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter gs42

    (@gs42)

    Thanks Steve – appreciated!

    (And glad to know it’s not just me… lol)

    ~Graham

    Thread Starter gs42

    (@gs42)

    Ha – I’ve learned to cry and laugh at the same time. I’m certainly no cybersecurity expert, but I’ve dealt with my share of hacks over the years. Very stressful!

    Thanks for the link. I’ll take a look at that!

    ~Graham

    Thread Starter gs42

    (@gs42)

    That’s the thing Rob — all the sites that were hacked (there were more than just one — that was the worst) have either WordFence or AIOWS plugins. There are indications that it was a server attack, not a pure WordPress attack. I’m still trying to track that all down.

    But yes, security is paramount. I just finished changing passwords, etc. I’ll be monitoring…!

    Thanks,

    ~Graham

    Thread Starter gs42

    (@gs42)

    Hi Website Rob,

    We must have been replying at the same time. I tried disabling all the plugins exactly as you described (I use an “x” instead of a “1”, but…) and did all the Password Reset things. None of those worked.

    Replacing the DB with a backup solved the problem.

    Thanks for replying — much appreciated!

    ~Graham

    Thread Starter gs42

    (@gs42)

    Hi RoseHosting,

    Thanks for the quick response!

    I tried that — first time I’ve ever ventured into SSH — but it wouldn’t let me enter the password.

    What I did instead was upload a backup of the DB through PHPMyAdmin — that reset the login fine. (The site isn’t updated often, so this wasn’t a problem…)

    Thanks again for your help — much appreciated!

    ~Graham

    Thread Starter gs42

    (@gs42)

    Hi Again Corinna,

    I went back to one of the sites I was having trouble with, and your advice worked well for http to https. However, I still couldn’t get the non-www to www to work correctly in PHP 7.4.11. It worked fine in PHP 7.1.33 when I downgraded, but when I upgraded past that, I would get the following error when trying to access a non-www URL:

    Warning: Cannot modify header information – headers already sent by (output started at /home/servername/public_html/domainname.com/wp-config.php:1) in /home/servername /public_html/domainname.com/wp-includes/pluggable.php on line 1296

    I followed your philosophy and looked for a way to improve the .htaccess file code rather than find a plugin. It took some research and some cobbling together of various code (including the Dreamshost example you suggested) and came up with this:

    # Force WWW & SSL
    RewriteEngine on
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
    RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ https://www.domainname.com/$1 [L,R=301]
    Header always set Content-Security-Policy “upgrade-insecure-requests;”
    # END Force WWW & SSL

    I’m not sure if it’s pretty, but it works. Now, I can type in any combination of http, https, www, and non-www, and it will always redirect to https://www.domainname.com without any errors — even in PHP 8.0.0rc1.

    I put this here in the hopes that it will help someone else stuck on the same problem.

    Thanks again for your help!

    ~Graham

    Thread Starter gs42

    (@gs42)

    Okay – thanks Corrina!

    ~Graham

    Thread Starter gs42

    (@gs42)

    Thanks for this, Corrina.

    “Adding to cPanel” – adding it via the “Redirect” module

    I followed the directions, and it seemed to work. But what was actually happening was that the server reverted back to PHP 7.1.33 from 7.4.11

    So, back to the drawing board.

    (I also changed the SSL certificate to “Wildcard” but taht didn’t change anything.)

    ~Graham

    Thread Starter gs42

    (@gs42)

    EDIT

    • This reply was modified 3 years, 8 months ago by gs42.
Viewing 9 replies - 1 through 9 (of 9 total)