简体   繁体   中英

Wordrpress 403 Forbidden Error

Getting the following error when trying to log into my Wordpress install:

Forbidden

You don't have permission to access /newsite/wp-login.php on this server.

Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips mod_bwlimited/1.4 PHP/5.3.27 mod_perl/2.0.6 Perl/v5.10.1 Server at ctcatholic.org Port 80

I have checked permissions on the wp-config.php and the wp-login.php pages and made sure that they were set to 644. I also made sure the folder for the admin files was set to 755.

My .htaccess file has this inside:

# 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

Any thoughts on how else I can fix?

I think you're running into general permissions issues with all WordPress files and folders.

(And .htaccess doesn't set permissions; the Unix file system does.)

Best thing to do is read Changing File Permissions « WordPress Codex:

Typically, all files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should never be owned by the webserver process itself (sometimes this is www, or apache, or nobody user).

Any file that needs write access from WordPress should be owned or group-owned by the user account used by the WordPress (which may be different than the server account). For example, you may have a user account that lets you FTP files back and forth to your server, but your server itself may run using a separate user, in a separate usergroup, such as dhapache or nobody. If WordPress is running as the FTP account, that account needs to have write access, ie, be the owner of the files, or belong to a group that has write access. In the latter case, that would mean permissions are set more permissively than default (for example, 775 rather than 755 for folders, and 664 instead of 644).

So you need to chmod files and folders to the needed WordPress permissions scheme.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM