Browse help topics

Troubleshooting

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.

  • Updated
  • Last reviewed
  • Intermediate
  • About 20 minutes

Applies to: cPanel WordPress Blue Arctic Shared Web Hosting (cPanel); WordPress 7.x and other PHP sites

On this page
  1. Step 1: Read the error log
  2. Step 2: Undo your last change
  3. Step 3: Test the .htaccess file
  4. Step 4: Check file permissions (403)
  5. Step 5: Rule out a plugin or theme (500)
  6. A 403 only on one form or page
  7. How to tell it worked
  8. Troubleshooting
  9. Still need help?

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

  1. Log in to cPanel, click Performance in the sidebar and open the Recent Errors tab (older layout: the Errors icon).
  2. 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.
  3. PHP errors may go to a file named error_log instead. In cPanel, click Files and open the File Manager tab, then your site’s folder (usually public_html). If error_log is 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.
  4. 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.

  1. 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).
  2. Open public_html (or the folder for this site).
  3. Select .htaccess, click More (⋮), choose Rename and change the name to .htaccess-old.
  4. Reload your site. Still broken? Rename the file back to .htaccess and go to Step 4 or 5. If the site loads, the old file was the cause.
  5. 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.
  6. Copy back the blocks you still need, one at a time. If the old file has a block from # php -- BEGIN cPanel-generated handler to # php -- END cPanel-generated handler, copy it first: it sets your site’s PHP version. Then others, such as # BEGIN LSCACHE to # END LSCACHE, a block mentioning lsapi_module (PHP settings), and any password, blocking or security plugin rules. Open .htaccess-old with Edit (under More, ⋮) and copy the block. Open .htaccess with Edit, paste it above # BEGIN WordPress (or at the top on other sites) and save.
  7. Reload your site after each block. If the error comes back, remove that block.
  8. Keep .htaccess-old for 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.

  1. In File Manager, select the file or folder named in the error, then click Permissions.
  2. Write down the current number so you can put it back. Leave wp-config.php at 400 or 440 if that’s what it is now.
  3. Change the number to 755 for a folder or 644 for a file, and confirm.
  4. 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:

  1. If you can log in to WordPress, go to Plugins and click Deactivate under it.
  2. If you can’t log in, open wp-content/plugins in File Manager.
  3. Select the plugin’s folder, click More (⋮), choose Rename and add -off to the end of its name.
  4. 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 -off if 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.php or index.html file.

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.

Was this article helpful?

Report outdated instructions or suggest an improvement
Type of report

Please do not include passwords or personal information.

Still need help?

Our support team can look into your account and walk you through it.