• Resolved mcfreder

    (@mcfreder)


    Hi,

    My wordpress htaccess keeps changing every week; and It becomes chmod 444 impossible to revert Unless I Re-update wordpress through the admnistration panel.

    My htaccess has the comments #Begin and #END correctly set.

    Please help with with this issue, I have been struggling for 2 months now.

    Thank you

Viewing 13 replies - 1 through 13 (of 13 total)
  • have you contacted your webhost about this?

    They would be the first to look into this, to see if a server configuration is responsible. (WordPress out of itself does not change the chmod)

    Thread Starter mcfreder

    (@mcfreder)

    Thank you for your response. It is a dedicated server, the problem is only with worpress Sir. is there at least a command line to find out which file is responsible for changing htaccess?

    Moderator t-p

    (@t-p)

    @mike has offered you good suggestion to discuss the issue with them.

    Meanwhile try:
    – deactivating ALL (yes all) plugins temporarily to see if this resolves the problem (plugin functions can interfere). If this works, re-activate them individually (one-by-one) to find the problematic plugin(s).
    resetting the plugins folder by FTP. Sometimes, an apparently inactive plugin can still cause problems. Also remember to deactivate any plugins in the mu-plugins folder (if you have created such folder). The easiest way is to rename that folder to mu-plugins-old.
    – If that does not resolve the issue, try switching to the unedited default Twenty Fifteen theme for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins).

    Thread Starter mcfreder

    (@mcfreder)

    Thank you very much guys for your cooperation and help. I appreciate it very much!!!! I have renamed plugins folder , and switched to twenty fifteen theme and then went to change the htaccess file but after few seconds It got overwritten and set to chmod 444 again. I have also just received a reply from the server provider, they told me that the server is managed by me and that they have no business with it. Basically I have access to the entire server, so any suggestions will be highly appreciated.

    The htaccess file keeps changing to the standard wordpress rules:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Moderator t-p

    (@t-p)

    Once you have the right code in your .htaccess file, try chmoding it to 644

    Thread Starter mcfreder

    (@mcfreder)

    Yes Sir. Unfortunately I did that and also tried to lock it with chmod 444 and 404 and 500 but to no avail ??

    Thread Starter mcfreder

    (@mcfreder)

    I also tried to change ownership using chown command but after a while; I could not access the website. I entered the console and I saw a message “System is disabled because of high load CPU 4.0”. So I had to change back the ownership.

    If you place an empty .htaccess, it gets overwritten by WordPress with a htaccess with WordPress rules in them, and permission set to 444?

    Do you have the better wp security plugin activated/installed?

    Thread Starter mcfreder

    (@mcfreder)

    Exacly Sir! Even empty or added few lines to it it get overwritten and chmod 444. I never installed better wp security plugin, but I have installed All In One WP Security/BulletProof Security 2 weeks ago to resolve my issue, but It didn’t solve so I disabled them then.

    I am experiencing the same issue. Did you find a fix?

    @vinsite54: Please post your own support topic.

    Thread Starter mcfreder

    (@mcfreder)

    @vinsite54: Sorry for not updating this topic. I have solved it after 2 weeks of struggle. I have a dedicated server (Ubuntu). I used ClamAv: https://help.ubuntu.com/community/ClamAV

    to scan all my websites in my server, and I found hidden malwares in all my wordpress websites theme directory mainly, and more malwares hidden in other locations. Do not panic! Just run a scan with clamav and it will generate a report of all the locations of the malwares, then you just have to delete them manually. Then go ahead and do a fresh install of your wordpress website(s). The best way to do it is to delete all wordpress core files except – {/wp-content/ & wp-config.php} reupload fresh files from the latest version. Then go to the admin panel and re-update again. At this point you should be able to edit your htaccess back to it’s old settings, but first change htaccess chmod 444 to 644.

    You might also run into another issue maybe now maybe later, but it’s easy to fix it, check my answer to this post: https://stackoverflow.com/questions/29896125/wordpress-database-returns-error-500

    you can keep this post updated and i will read you up.
    Best of luck bro,

    Moderator t-p

    (@t-p)

    Glad to know it ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WordPress htaccess keeps changes weekly’ is closed to new replies.