How to Fix 403 Forbidden and 500 Internal Server Errors
A 403 means the server refused the request; a 500 means something on your site failed while building the page. Most come from a broken .htaccess file, wrong file permissions, or a plugin. Check the error log, undo the last change, then test.
Applies to: cPanel WordPress Blue Arctic Shared Web Hosting (cPanel); WordPress 7.x and other PHP sites
On this page
The two errors mean different things:
- 403 Forbidden: the server understood the request but won’t serve it. Usually a permission setting, a rule in
.htaccess(a hidden settings file in your site’s folder), or a security block. - 500 Internal Server Error: something on the server failed while building the page. Usually
.htaccess, a plugin, a theme or a PHP setting.
Note
These steps use cPanel on Shared Web Hosting; on Managed WordPress Hosting, open a support ticket. Can’t find a cPanel tool? Type its name in the search box (Ctrl+K or Cmd+K), or open a ticket.
Step 1: Read the error log
- Log in to cPanel, click Performance in the sidebar and open the Recent Errors tab (older layout: the Errors icon).
- Find lines from the time of the error. For example, a line with
wp-content/plugins/contact-form/points to the Contact Form plugin. Copy the whole line. - PHP errors may go to a file named
error_loginstead. In cPanel, click Files and open the File Manager tab, then your site’s folder (usuallypublic_html). Iferror_logis there, select it, click More (⋮) and choose Edit to read it; the newest lines are last. Close it without saving. If it won’t open, it may be too big: go on to Step 2. - Nothing in either place? Go on to Step 2. We can read the logs for you in a ticket.
Step 2: Undo your last change
If the error started right after you changed something, reverse that one change and reload the page. Switch off a plugin you installed or updated (Step 5). Remove lines you added to .htaccess (Step 3 shows how to open it). Remove a rule you added in a security plugin, but leave the plugin on. Switch back a PHP version change (see How to Change Your PHP Version).
Step 3: Test the .htaccess file
Warning
Rename the file; don’t delete it. While it’s renamed, every rule in it is off, including any https redirect, folder password and security plugin rules. On WordPress, pages other than the home page may show a 404 error until step 5. Your site may also run on the server’s default PHP version until step 6.
- In File Manager, click the More icon (⋮) in the toolbar and select Show hidden files (older layout: click Settings, select Show Hidden Files and click Save).
- Open
public_html(or the folder for this site). - Select
.htaccess, click More (⋮), choose Rename and change the name to.htaccess-old. - Reload your site. Still broken? Rename the file back to
.htaccessand go to Step 4 or 5. If the site loads, the old file was the cause. - On WordPress, go to Settings → Permalinks and click Save Changes to create a fresh file. Not WordPress? Use New File to make an empty file named
.htaccess. - Copy back the blocks you still need, one at a time. If the old file has a block from
# php -- BEGIN cPanel-generated handlerto# php -- END cPanel-generated handler, copy it first: it sets your site’s PHP version. Then others, such as# BEGIN LSCACHEto# END LSCACHE, a block mentioninglsapi_module(PHP settings), and any password, blocking or security plugin rules. Open.htaccess-oldwith Edit (under More, ⋮) and copy the block. Open.htaccesswith Edit, paste it above# BEGIN WordPress(or at the top on other sites) and save. - Reload your site after each block. If the error comes back, remove that block.
- Keep
.htaccess-oldfor a few days. Not sure what to copy back? Open a support ticket.
Step 4: Check file permissions (403)
WordPress recommends 755 for folders and 644 for files.
Warning
Never set anything to 777. It lets anyone on the server change the file.
- In File Manager, select the file or folder named in the error, then click Permissions.
- Write down the current number so you can put it back. Leave
wp-config.phpat400or440if that’s what it is now. - Change the number to
755for a folder or644for a file, and confirm. - Not sure which file is blocked, or the numbers were already right? Open a support ticket with the page address.
Step 5: Rule out a plugin or theme (500)
If the log names a folder in wp-content/plugins, switch that plugin off:
- If you can log in to WordPress, go to Plugins and click Deactivate under it.
- If you can’t log in, open
wp-content/pluginsin File Manager. - Select the plugin’s folder, click More (⋮), choose Rename and add
-offto the end of its name. - Reload your site. Error gone? That plugin caused it: leave it off until you update or replace it. Don’t wait if it’s a security plugin. Still broken? Turn the plugin back on: remove
-offif you added it, then activate it under Plugins.
If the log names a theme in wp-content/themes, or says memory is exhausted, open a support ticket and paste the log line.
A 403 only on one form or page
A security rule on the server may have blocked it. Don’t try to work around it: open a support ticket with the page address and the exact time.
How to tell it worked
The page loads in a private browser window, and no new lines appear in the error log when you reload it.
Troubleshooting
- 403 on your home page right after uploading a site: check that your site’s folder has an
index.phporindex.htmlfile.
Still need help?
Open a support ticket from the Client Portal at my.bluearctic.com. Include the page address, the exact error, the time it happened, the matching lines from the error log, a screenshot, and what you already tried. Never include a password.