Description
If that’s not the case, remember the STEP ONE is always, check your webserver error_log for the domain in question. Failing that, below are some common problems and solutions that may help you get back on track.
If you have a problem/solution you think should go here, feel free to let us know.
Common Potential Problems
- Webserver Error 500 (Generic)
- Webserver Error 403 (Forbidden)
- Check your Apache httpd error_log for your domain,
tail -f /var/log/httpd/example.com_error_log
- Reset file and directory permissions for the DocumentRoot
- Create an explicit entry in your VirtualHost allowing access
- Check your PHP handler and make sure it’s setup correctly.
- Webserver Error 404 (Not Found)
- Redirect loops
- Can’t Establish Database Connection
- PHP code rendering as plain text directly in the browser
Problem This is a generic webserver error that essentially means “something is wrong, check the error log for details”.
Solution Start by checking your webservers error logs. A common problem is using “php_value” directives in your .htaccess file and which aren’t supported by some PHP handlers.
Problem This could be file/directory permissions and/or ownership, it could be a deny statement somewhere in your webserver configuration or the PHP handler could be incorrect.
solution(s)
find /path/to/documentroot -type f -exec chmod 644 {} \; && find /path/to/documentroot -type d -exec chmod 755 {} \;
Apache httpd 2.2
1 2 3 4 | <Directory /path/to/documentroot/> Order allow,deny Allow from all </Directory> |
Apache httpd 2.4
1 2 3 | <Directory /path/to/documentroot/> Require all granted </Directory> |
Problem If previously using “pretty permalinks”, they need to be “refreshed”
Solution In the wp-admin go to: Settings –> Permalinks and click “save” twice. Make sure mod_rewrite is enabled and the AllowOverride FileInfo or AllowOverride All directive is set in the Directory block of your VirtualHost (this enables the use of .htaccess files).
Problem Incorrect redirect or rewrite rules in .htaccess or the main webserver configuration.
Solution Rename .htaccess, check the main configuration and comment out any redirect or rewrite rules. Check error logs or rewrite logs for clues.
Problem Receiving an error in the browser Can’t Establish Database Connection.
Solution Verify each of these settings or conditions: Incorrect database name, database user, database user password, database host, database server is not running, stalled or disk is full, connection issue with database server (if on another host).
Problem PHP is not installed and/or loaded correctly in the main webserver config.
Solution Install PHP and or set a proper PHP Handler, restart the webserver