You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe - wordpress

I wanted to updated my Wordpress site, before updating I took backup for the entire website folder and so I installed an updated theme but later I decided to remove the update by deleting the whole website folder and put back the backup folder. after that I get this error
Forbidden
You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
my site is Business Directory in Tanzania

I assume you sorted out your htaccess issue, as I can see your website loading.
But, as it stands now, a lot of your static assets (css and images) aren't loading.
Seems some type of an issue with your Amazon Cloudfront configuration - I'd clear the Amazon cache and see if that resolves it.
If not, turn it off, and try to debug

I checked the data base on myphpadmin and I found out it was deleted, so I created another one with same credentials like on wp-config, and now it works fine. Thanks much

Related

Changing URL Wordpress- still not working despite checking/editing database

As much as may sound like a broken record - I changed the URLs on my WP site, and now I get a 404.
What I wanted to do:
Change site URL from www.SiteA.com to www.SiteB.com
All WP files were at the time in another directory in the same hosting account. I needed them in the root directory, accessible by www.SiteB.com
What I did:
Backed up locally and remotely - Database and files.
Edited URL's through dashboard on WP - got a login error afterward, but seemed to do it anyway.
Moed ALL old site files from root to backup folder.
Moed ALL wordpress files from original directory to root directory.
Then I got a 404 error and was unable to access WP-admin or login through the new or old URL.
What I tried to fix the issue:
Noticed http should be https - changed this in 'options' within phpmyadmin, both at 'siteurl' and in 'home'.
Still 404
Then I tried defining the db_name in the wp-config file.
Still 404
Then I gae up, changed the URL's back using myphpadmin, and moed the filed back to their original directory. Now I can login to WP as usual and eerything is fine.
Why can't I access the site when I moe it into the root directory - I thought I had all the steps right!
Thanks in adance for any help
oh..and apologies, my keyboard is missing a few keys :(
Wordpress stores url/permalinks on database field values as well, changing only the configuration files will not be enough.
I am pretty sure there are other options, on my case i use often perform Wordpress website migrations, and the following tool becomes really handy when search and replacing domains on the database records.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Hope it helps.
Jose
This happened to be an SSL issue where the host for our SSL certificate was conflicting with the stylesheet somehow. 0_o

Wordpress Server unable to read htaccess file, denying access to be safe

I am running wordpress on my own managed server so I have complete access to the box. The issue I'm having is that users can upload images to my image library but any uploaded are not loading due to 403 errors.
When I go directly to one of the images I get the message "Server unable to read htaccess file, denying access to be safe"
I have set the permissions on the .htaccess file and all files to 775 but it made no difference.
I also tried nuking the file and uploading a new .htaccess from a fresh wordpress download in case it was corrupted but it made no difference.
The strange thing is the images do display in one context, when you use the wordpress image editor.
Not sure what to do about this, I'm a drupal developer and only have a passing familiarity with wordpress.
Example working legacy image:
http://www.bonnybridgeanglingclub.com/wp-content/uploads/2016/06/DSC_0671.jpg
Example broken recent image:
http://www.bonnybridgeanglingclub.com/wp-content/uploads/2017/02/652-1024x640.jpg
Any help would be greatly appreciated.
It turned out the problem was that for some reason when the 2017 directory was created inside the uploads folder it was created with the wrong permissions, very odd, I've fixed the permissions and all is well now.

WordPress website down

I'm new to programming & I have learned how to create websites using WordPress technology. I have created a website www.popstudio.in and it was working fine before.
Recently when I try to access the website, I get the following error.
The popstudio.in page isn’t working
popstudio.in is currently unable to handle this request.
HTTP ERROR 500
I have attached a screenshot, refer screenshot
Note:
This is WordPress based website.
I have renamed the plugins folder and still the website was down.
I have renamed the themes folder still the website was down.
Common Solutions for the 500 Internal Server Error.
The two most common causes of this error are a corrupted .htaccess file and exceeding your server’s PHP memory limit.
The .htaccess file in your WordPress directory can become corrupted after you install a plugin or make another change to your WordPress site. The fix is simple. All you need to do is create a new .htaccess file.
PHP memory limit issues often occur as the result of a poorly-coded plugin running on your site or a site that’s grown considerably over time and is using too many plugins. You’ll begin to exceed the PHP memory limits set by your hosting provider once either of these things happen. The result is a 500 internal server error.
Error 500 is a very generic error message. The information you're providing is not enough for someone here to help you.
The first place you want to look at is the log file. On an Apache server it is a file called error_log in the directory of your site.
You can check if your .htaccess file is properly configured.
Otherwise get in touch with your web host support!
Good luck
Have you tried to delete (after make a backup) the .htaccess file on the root path of the site? If it work, just resaved permalinks from the back-office after that.
Most of the 500 errors on WordPress are due to a problem with this file (corrupted, rights problem ...).
Go to wp-config.php and update it
define( 'WP_DEBUG', false);
to
define( 'WP_DEBUG', true );
Make sure that once you have found your issue, to return it back to 'false'. Just as a security 'best practice'.

cPanel - send 404 to a php page?

I have an issue in a WordPress site on Hostgator where the htaccess file keeps disappearing. Before you get all, "Check your plugins, dummy" I have the same install of this site running on a completely separate Hostgator account and it's running fine. Furthermore, I have a local instance which, again, is running fine. So if it was a plugin, the issue would be replicated on the other instances, but it's not.
My suspicion is someone who has access to the hosting account is tampering with it. While that sounds paranoid, I can't rule anything out because htaccess files don't just delete themselves.
The bandaid fix has been to just reset permalinks once the site goes down. Annoying, but simple. What might be even neat would be to set my server 404 page to a php script that, when accessed, hits an endpoint I set up in WordPress to programmatically flush the rewrite rules, thus restoring the htaccess page, and then the 404 tries to forward them on again. However, the suggestions on how to do this say putting the error page definitions in the htaccess page. Which doesn't do me much good if the htaccess page is being deleted.
How stupid is this idea? Please let me know in comments.
I'm open to other solutions, but I'm waiting on my hosting support to figure out how the file is being deleted because I assume others with the account info of tampering.

403 error in Wordpress 4.0 options.php

I want to disable comments site-wide on a Wordpress site, but I keep getting this one annoying problem.
I've looked around and all of the results are for older versions of Wordpress. I have a fresh install of Wordpress 4.0 onto a namecheap hosting server.
When I try to disable comments in Settings > Discussion by unchecking the box and clicking on the submit button below, I get redirected to a page that says:
You don't have permission to access /wp/wp-admin/options.php on this
server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
One suggestion from a few threads from 5-7 years ago was to modify the .htaccess and permissions. I tried, it still is returning the same error. Those suggestions were for older, less secure versions of Wordpress, so I'm thinking there should be a different workaround for 4.0. I also for some reason don't have SSH access to the server, probably because of some stupid namecheap / cpanel restriction.
I went ahead and contacted namecheap directly and they corrected it quickly - I don't think there's anything you can do. Specifically, they said:
We have whitelisted Mod Security rule which has been triggered. Please try preform necessary actions one more time.
Hope that helps.
Check your Privileges of wordpress database users.
Check also file & folder permission.
( a folder permission 755 and file permission 644 )

Resources