Link to home
Start Free TrialLog in
Avatar of Deerek11
Deerek11Flag for United States of America

asked on

wordpress 404 error ...htaccess

Hello, I have a word press site that ever day or so it gives me a 404 error page, then to resolve the problem I just log in to the ftp manager and restore just the htaccess file and the site comes back up ....... Does this problem point at my word press theme or word press itself??
Avatar of Gary
Gary
Flag of Ireland image

What do you mean restore the .htaccess - is it disappearing?
Avatar of Deerek11

ASKER

Its not disappearing it changes .....I use go daddy and when I log into the FTP manager it shows an exclamation point besides any files or folders that has been changed and the htaccess file is the only file that is mark so I use go daddy's FTP manager witch allows you to restore any file or folder of choice 30 days back so I just choose the day before and only the htaccess file and the site comes right back up......I wasn't sure what direction to go in to fix this
SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm going to second Gary's guess and go one further:

Do you have a caching plugin installed (W3 Total Cache, WP Super Cache, etc.)?
I am not sure if any of the plugins are cahching plugins how do I determine that?

Akismet
Formidable
Form Maker
Google Analytics
Hello Dolly
Jetpack by WordPress.com
Paypal Pay, Buy, Donation and Cart Buttons Shortcode
Sliding Youtube Gallery
SurveyMe
WordPress SEO
WP Simple Survey
WP Survey And Quiz Tool

Also I now have looked at the content of both htaccess file and the only difference if the bad one add END WORDPRESS twice and the last end wordpress doesnt have a # before it

 # 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
END WordPress
Can you revert to the default theme, go to some pages and refresh them several times and see if it still overwrites the .htaccess.
If it doesn't then restore your theme and do the same process and see if the .htaccess is overwritten.
I just reverted back to the default theme and refreshed a few of the pages ..... and switch back to the theme I was using .... now is a waiting game due to the site doesn't go down everyday.... it goes down about every other day
It just went down again....... Reverting to the default theme and refreshing the pages didn't fix it
Get your ISP involved and have them look for a server cron job that may be altering or replacing your .htaccess file.  If they give you an all-clear then I would start thinking about scanning your site for a hack.
Are you able to leave the default theme for a day or so?
I can't leave it with another theme a few days it would create a bit of trouble ....I just called Go Daddy and they recommended that I purchase anti virus on the host for 3.33 a month that would point me in the direction of the problem..... do you think this would find the problem
Why would a virus do that? Sales BS!
Can you run a copy of the site locally, this may be a plugin/theme that is running the code at a certain time of day. If you can run it locally, you could mess with the time to get it to activate.
I guess the reason Go Daddy recommend that I use antivirus /malware protection is about a year ago the entire site just disappeared someone must had logged in and deleted all my word press content I had to use the restore feature to bring the site back up .....
Running it locally ... I tried to accomplish this as I was building the site to have a test environment and it went ruff I couldn't get my theme to work right .....But I am willing to do this if it will help me fix the problem ....
It's easy to mess things up locally and fix them than it is on a live site. And easier to find problems.
You should really have a local copy of your site anyway.
All you should need to do is use something like XAMPP. Copy your entire website to the localhost folder, backup your db and restore it locally.
Then you should have a complete copy of your site that should just work as is.
Did you check for any cron jobs as Jason asked?
GoDaddy is (in)famous for having poor security practices and then blaming the user and attempting to upsell them extra security which doesn't actually prevent the problem since the problem is the compromised server.

Short version:

1) if you want to buy upgrading security, subscribe to Sucuri or StopTheHacker, not GoDaddy's offering.

2) get away from godaddy hosting.  You can do better at roughly the same price points elsewhere.  If you can afford it, go with specialized Wordpress hosting such as wpengine.
If there is a cron job running I didn't set it up .... If there was one without my knowledge how would I know?
The ISP runs crons to do all kinds of server maintenance, including backups and restores.  It might be that one of them is corrupt and that's why the .htaccess file is being overriden.  

The problem with this kind of question is that there are so many possibilities that we can't answer with just one thing.  You need to get your ISP and probably a third-party security service involved to figure this out.
Do you think the security software go daddy offers is worth a shot for three months with hopes that it detects something......   it seems like it so many things that could be creating the problem got me not sure which direction to started with
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial