Установка wordpress ошибка 403

Are you dealing with the 403 Forbidden error on your WordPress site?

It is one of the most annoying errors that a WordPress beginner can come across. It may stop you from accessing your WordPress admin area and/or specific pages on your website.

In this article, we will show you how to easily fix the 403 forbidden error in WordPress.

Fixing 403 Forbidden error in WordPress

What Is the 403 Forbidden – Access Denied Error in WordPress?

WordPress shows codes and messages when an error occurs on your website. You can see our list of the most common WordPress errors and how to fix them for some examples.

The 403 Forbidden error code is shown when your server permissions don’t allow access to a specific page.

403 Forbidden status code shown on a WordPress site

This is why the error is usually accompanied by the text:

403 Forbidden – You don’t have permission to access ‘/’ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

There are different scenarios when you might see this error. For example:

  • 403 Forbidden – Access denied on the wp-admin or WordPress login page.
  • 403 Forbidden – During WordPress install.
  • 403 Forbidden error – When visiting any page on your WordPress site.

You may also see ‘Access Denied’ instead of the full 403 Forbidden status. Alternatively, the message might say, ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’

Now that you know about the different types of 403 errors, let’s talk about their causes.

What Causes the 403 Forbidden Error in WordPress?

The most common cause for the 403 Forbidden error in WordPress is poorly-configured security plugins. Many WordPress security plugins can block an IP address (or a whole range of IP addresses) if they believe them to be malicious.

This is why we use Sucuri to improve the security of all our WordPress sites.

Another possible cause could be a corrupt .htaccess file or incorrect file permissions on your server.

Your WordPress hosting company can sometimes make accidental changes to their server settings. This may result in a 403 Forbidden error on your site.

Having said that, let’s take a look at how to fix the 403 forbidden error in WordPress.

  • Fixing the 403 Forbidden Error in WordPress
  • Fixing the 403 Forbidden Error Caused by a WordPress Plugin
  • Fixing the 403 Forbidden Error Caused by Corrupt .htaccess File
  • Fixing the 403 Forbidden Error Caused by File Permissions in WordPress

Video Tutorial

Subscribe to WPBeginner

If you’d prefer written instructions, then just continue reading.

Fixing the 403 Forbidden Error in WordPress

Before you do anything, we recommend that you create a complete WordPress backup of your website. You can check out our guide on how to backup your WordPress site.

If you are using an automatic WordPress backup plugin, then make sure that you have access to the latest backup before moving forward.

Fixing the 403 Forbidden Error Caused by a WordPress Plugin

The first thing you need to do is to temporarily deactivate all WordPress plugins. This includes any security plugins that you may have installed on your site.

If this resolves your problem, then this means one of the plugins on your website was causing this error.

You can figure out which plugin was causing the error by activating all your plugins one at a time until you reproduce the 403 forbidden error. Then, you will need to delete the problem plugin and look for an alternative or contact the developers for support.

Fixing the 403 Forbidden Error Caused by Corrupt .htaccess File

Often, the 403 error is caused by a corrupt .htaccess file in your WordPress site. The good news is that fixing this file is quite easy.

First, you need to connect to your website using an FTP client or the File Manager app in cPanel.

Next, find the .htaccess file in the root folder of your WordPress site. See this guide if you can’t find the .htaccess file in Your WordPress folder.

You will need to download the .htaccess file to your computer so that you have a fresh backup of it. After that, simply delete the file from your server.

Delete .htaccess file from your WordPress site

Try accessing your website. If the 403 forbidden error is resolved, then this means that your .htaccess file was corrupt.

You can generate a fresh .htaccess file by logging in to your WordPress admin area and going to the Settings » Permalinks page.

Regenerating .htaccess file in WordPress

Simply click on the ‘Save Changes’ button at the bottom of the page, and WordPress will generate a fresh .htaccess file.

Fixing the 403 Forbidden Error Caused by File Permissions in WordPress

If the other solutions have not fixed the 403 forbidden error on your site, then incorrect file permissions can be the most likely cause.

All files stored on your website have file permissions. These file permissions control who can access the files and folders on your WordPress website.

Incorrect file permissions can cause the 403 forbidden error. They make your web server thinks that you do not have permission to access those files.

You can ask your WordPress hosting provider to check your website for correct file permissions. Some hosts are very supportive, so they won’t mind and will probably fix that for you.

Changing file permissions yourself can have serious consequences. If you do not feel confident doing it yourself, then ask a friend for help or hire a professional.

However, if you want to do it yourself, then here is how to check your file permissions.

Simply connect to your WordPress site using an FTP client. Navigate to the root folder containing all your WordPress files.

Checking file permissions

Click to select a folder, right-click it, and then select ‘File permissions’ from the menu.

Your FTP client will show you a file permissions dialog box like this:

Changing file permissions using FTP

All folders on your WordPress site should have a file permission of 744 or 755.

All files on your WordPress site should have a file permission of 644 or 640.

You can set the file permission for the root folder to 744 or 755. You also need to check the box next to ‘Recurse into subdirectories’ and then check the option that says ‘apply to directories only’.

Simply click on the ‘OK’ button. Your FTP client will now start setting permissions for all subdirectories in that folder.

Once it is done, you need to repeat the process for all the files. This time you will use file permission of 644 or 640, and don’t forget to select the ‘Recurse into subdirectories’ and apply to files only’ options.

Click on the ‘OK’ button, and your FTP client will start setting file permissions for all the selected files.

Try accessing your website now, and the 403 forbidden error should be gone.

We hope this article helped you fix the 403 forbidden error in WordPress. You may also want to see our expert tips and hacks to protect your WordPress admin area, along with our top picks for the best WordPress plugins to grow your site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience building WordPress websites. We have been creating WordPress tutorials since 2009, and WPBeginner has become the largest free WordPress resource site in the industry.

Вам пришлось столкнуться с ошибкой 403 Forbidden на своем сайте на WordPress? Это одна из самых страшных ошибок, с которой может столкнуться новичок. В этой статье м покажем вам как легко исправить ошибку 403 Forbidden в WordPress.

403forbiddenerror[1]

Что за ошибка 403 Forbidden – Access Denied Error в WordPress?

WordPress отображает коды и сообщения, когда ошибка возникает на сайте.

403screenshot[1]

Код ошибки 403 Forbidden показывается тогда, когда права, установленные на сервере, не позволяют получить доступ к определенной странице.

Именно поэтому ошибку часто можно видеть с текстом:

403 Forbidden – You don’t have permission to access ‘/’ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Ошибку можно увидеть в различных ситуациях. Например:

  • 403 Forbidden – Запрещен доступ к wp-admin или странице входа в WordPress.
  • 403 Forbidden – во время установки WordPress.
  • 403 Forbidden при попытке открыть любую страницу на сайте.
  • Возможно, что вы получаете только сообщение ‘Access Denied’ вместо полного статуса 403 Forbidden.
  • Также можно увидеть ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’

Теперь, когда мы определили различные типы ошибок 403, давайте поговорим о том, что приводит к этим ошибкам.

Что вызывает ошибку 403 Forbidden в WordPress?

Наиболее вероятной причиной возникновения ошибки 403 Forbidden в WordPress являются плохо настроенные плагины безопасности. Многие из них блокируют IP адреса (или даже всю подсеть), если считают, что они вредоносны.

Второй возможной причиной может быть поврежденный файл .htaccess или некорректные права доступа к файлу на вашем сервере.

Ваш хостер также может внести какие-то изменения в настройки сервера, что может привести к рассматриваемой ошибке.

Давайте же посмотрим как можно исправить ошибку 403 forbidden в WordPress.

Исправляем ошибку 403 Forbidden в WordPress

Прежде чем что-либо сделать, мы рекомендуем вам создать полный бекап сайта.

1. Исправляем ошибку 403 Forbidden, вызванную плагином WordPress

Для начала вам потребуется временно отключить все плагины WordPress, включая все плагины безопасности, которые вы устанавливали.

Если это решит проблему, тогда станет понятно, что один из плагинов вызывает ошибку.

Выяснить, какой именно, можно будет, если отключить все плагины, а затем включать по одному, пока не появится ошибка 403.

2. Исправляем ошибку 403 Forbidden, вызванную поврежденным файлом .htaccess

Часто ошибка 403 возникает из-за поврежденного .htaccess файла вашего сайта. Починить его очень просто.

Подключаемся к сайту по FTP или через Менеджер файлов хостинга.

Находим файл .htaccess в корневой папке своего сайта.

Скачиваем файл на свой компьютер, чтобы у нас была свежая его копия. Далее, удаляем файл с сервера.

delete-htaccess[1]

Пытаемся открыть свой сайт. Если ошибка 403 пропала, значит ваш .htaccess файл был поврежден.

Сгенерировать новый можно в админке сайта, если перейти на страницу Настройки » Постоянные ссылки.

regenerate-htaccess[1]

Просто нажимаем на кнопку Сохранить изменения внизу страницы и WP сгенерирует свеженький файл .htaccess.

3. Исправляем ошибку 403 Forbidden, вызванную правами доступа к файлам в WordPress

Все файлы, хранимые на вашем сайте, имею права доступа. Эти права контролирует тот, у кого есть доступ к файлам и папкам сайта.

Некорректные права доступа могут вызывать ошибку 403, потому как ваш веб сервер начинает считать, что у вас нет прав на доступ к тем файлам.

Если два вышеуказанных решения не помогли с проблемой, тогда скорее всего дело в правах доступа.

Вы можете обратиться к своему хостеру для того, чтобы тот проверил сайт на предмет корректных прав доступа.

Изменение же прав самостоятельно может иметь негативные последствия. Если вы не слишком уверены в правильности своих действий, то лучше обратиться к знакомому или нанять профессионала.

Однако, если вы все-таки решите исправить проблему лично, то вот как можно проверить права доступа.

Просто подключаемся к своему сайту по FTP, а затем переходим в корневую директорию сайта, содержащую все файлы WordPress.

check-file-permissions[1]

Кликните на директорию для выбора, затем нажмите правой кнопкой мыши, после чего выберите File Permissions из меню.

Ваш FTP клиент отобразит вам диалог изменения прав доступа вроде такого:

changefilepermissions[1]

Все директории вашего сайта изменят права доступа с 744 на 755.

Все директории вашего сайта получат права доступа, изменив их с 644 на 644.

Можно изменить права доступа корневой директории с 744 на 755. Поставьте галочку рядом с ‘Recurse into subdirectories’, а затем отметьте опцию ‘apply to directories only’.

Нажимаем на кнопку ОК. Ваш FTP клиент начнет простановку прав доступа ко всем вложенным папкам в этой директории.

По окончанию процесса необходимо будет повторить проделанное для всех файлов. В этот раз вам нужно будет использовать права доступа 644 или 640 и не забыть выбрать опции ‘Recurse into subdirectories’ и ‘apply to files only’.

Нажимаем на кнопку ОК. Ваш FTP клиент обработает права доступа ко всем вложенным папкам в этой директории.

Попробуйте зайти на свой сайт, и ошибка 403 forbidden должна исчезнуть.

Мы надеемся, что эта статья помогла вам исправить ошибку 403 forbidden в WordPress.

По всем вопросам и отзывам просьба писать в комментарии ниже.

Не забывайте, по возможности, оценивать понравившиеся записи количеством звездочек на ваше усмотрение.

Rating: 3.0/5 (31 votes cast)

WordPress 403 ошибка - Forbidden

Ошибка WordPress 403 возникает из-за того, что запрещен доступ к страницам, которые пользователи пытаются посетить. Когда ваш сайт начинает отображать ошибку 403 Forbidden, это обычно означает, что запрос посетителя был отправлен и принят сервером, но сам сервер не дает доступ данному пользователю. Такая проблема довольно распространена – рассмотрим, почему она возникает и как восстановить доступ к сайту.

Причины появления ошибки 403 forbidden

Одна из частых причин образования ошибки 403 Forbidden связана с неудачной настройкой плагинов безопасности на сайте WordPress. Некоторые плагины, призванные обеспечить безопасность вашего сайта, могут заблокировать один или несколько IP-адресов, если посчитают их вредоносными.

Еще одна причина – ваша хостинговая компания может изменить настройки сервера. Это тоже способно вызвать на сайте ошибку 403 Forbidden.

Другой потенциальной причиной может оказаться некорректный файл .htaccess, а также неверные настройки доступа к каталогам и файлам сайта на удаленном сервере. В стандартно работающем файле .htaccess указаны настройки доступа через админку WordPress.

htaccess вордпресс

Если на третьей строке файла будет указано «Deny from all», эта команда установит запрет на посещение админпанели вашего сайта. В каких ситуациях может наблюдаться эта ошибка:

  • Отказано в доступе на странице входа в админку wp-admin или wp-login.
  • Ошибка обнаруживается в процессе установки WordPress.
  • Ошибка показывается при посещении любых страниц вашего сайта.

При этом ошибка на экране сопровождается соответствующим текстом типа фразы «Отказано в доступе», «У вас нет разрешения на просмотр этой страницы» или указывается полный статус ошибки 403.

Поскольку причины, вызывающие ошибку 403 хорошо известны, избавиться от нее просто. Но , прежде чем предпринять что-либо, рекомендуется сделать резервную копию сайта. Вы также можете развернуть локальную копию сайта и на ней искать причины ошибки. Это актуально, если сайт посещаемый, а ошибка появляется только при входе в админпанель.

Если ошибку 403 вызывает плагин WordPress

Не каждый плагин, который вы используете в WordPress, совместим с настройками вашего сайта. Чтобы убедиться, вызвана ли ошибка 403 некорректно работающим плагином, отключите все установленные плагины. Активируя их по одному, можно выяснить, какой именно плагин спровоцировал ошибку.

  1. Деактивируйте все плагины, установленные на сайте.
  2. Повторно активируйте один из плагинов в списке.
  3. Посетите сайт, чтобы увидеть, отображается ли ошибка 403.
  4. Повторите шаги 2 и 3, пока не отобразится ошибка 403.

Если проблема появления ошибки разрешится, значит причиной послужил один из установленных плагинов. Возможно, вам придется изменить его параметры конфигурации или полностью удалить.

Если после деактивации всех плагинов ошибка 403 все еще воспроизводится, проблема не связана с плагином. В этом случае нужно выполнить дополнительную диагностику.

Если ошибку 403 вызывает файл .htaccess

Файл .htaccess способен спровоцировать множество осложнений в работе сайта при неправильной настройке. Некорректный или измененный файл помешает пользователям зайти на страницы сайта. Есть два способа проверить файл .htaccess на сайте: с использованием подходящего плагина для WordPress или с помощью FTP-доступа.

  1. Подключитесь к сайту на удаленном сервере с использованием файлового менеджера.
  2. В корне сайта найдите файл .htaccess.
  3. Загрузите файл .htaccess на локальный компьютер, чтобы сделать его резервную копию.
  4. Удалите этот файл из корня сайта на сервере.

htaccess вордпресс

После этого попробуйте войти на ваш интернет-ресурс. Если ошибка 403 больше не появляется, значит файл был поврежден. Для создания нового файла .htaccess войдите в админ-панель WordPress в меню «Настройки» и выберите пункт «Постоянные ссылки». Внизу страницы щелкните по кнопке «Сохранить изменения», WordPress автоматически сформирует обновленный файл .htaccess. Изменять какие-либо текущие настройки при этом не требуется.

wp links

Если ошибка 403 вызвана отказом в доступе к файлам

Файлы и каталоги, которые хранятся на вашем веб-ресурсе, обладают настройками прав на доступ. Неправильные настройки способны спровоцировать ошибку 403.

Вы можете воспользоваться техподдержкой хостинг-провайдера и попросить проверить ваш сайт на корректность доступов к каталогам и файлам. Это также можно выполнить самостоятельно.

  1. Подключитесь к удаленному серверу с помощью файлового менеджера.
  2. Зайдите в корневой каталог сайта, где находится все его содержимое.
  3. Выберите папку, щелкните по ней правой кнопкой и найдите в выпадающем меню пункт «Права доступа к файлу».

FTP-менеджер отобразит диалоговое окно с настройками прав доступа. Все каталоги на сайте снабжены значением 744 или 755. Остальные варианты могут помешать добавлению в папку нового содержимого и предотвратят обновления, дополнения или изменения, которые могут потребоваться в будущем. Поставьте флажок «Перенаправить во вложенные каталоги» и выберите пункт «Применить только к каталогам». Подтвердите нажатием «ОК», FTP-программа установит права доступа на все подпапки в этом каталоге.

Повторите это действие для всех файлов на сайте. Файлы снабжаются правами доступа со значением 644 или 640. Если эти числа установлены неверно, это даст злоумышленникам возможность редактировать файлы, что грозит добавлением вредоносного кода в файлы сайта.

После нажатия «OK», FTP-программа настроит доступ на указанные файлы. После этого попробуйте перейти на ваш сайт, ошибка 403 больше не должна возникнуть.

доступ к файлу

Улучшаем безопасность вордпресса

В целях повышения безопасности и ограничения доступа к сайту для посторонних, можно прописать специальную команду в файле .htaccess, которая запретит вход в административную панель WordPress со всех IP-адресов, отличающихся от вашего.


<FilesMatch "(wp-login.php|wp-admin)">
Order deny,allow
Deny from all
Allow from 255.255.255.255
</FilesMatch>

Вместо 255.255.255.255 укажите ваш IP-адрес. Если вы используете несколько динамических IP, в этом случае в файл .htaccess придется записать все подсети, с которых Вы заходите в админ-панель. Вы также можете защитить страницу входа, установив на нее дополнительный пароль.

iPipe – надёжный хостинг-провайдер с опытом работы более 15 лет.

Мы предлагаем:

  • Виртуальные серверы с NVMe SSD дисками от 299 руб/мес
  • Безлимитный хостинг на SSD дисках от 142 руб/мес
  • Выделенные серверы в наличии и под заказ
  • Регистрацию доменов в более 350 зонах

Being barred from your own site can be very frustrating, especially when you have no idea what is causing the problem. The 403 Forbidden error typically occurs when you’re trying to log in to WordPress or visit a specific page on your site.

Fortunately, there are a few simple fixes for this common WordPress error. Depending on your hosting plan, you may even be able to resolve the issue with help from your web host.

In this post, we’ll take a closer look at the 403 Forbidden error and its main causes. We’ll then show you five ways to fix it. Let’s get started!

Get Content Delivered Straight to Your Inbox

Subscribe to our blog and receive great content just like this delivered straight to your inbox.

What the 403 Forbidden Error Is (And What Causes It)

The 403 Forbidden error is one of several HTTP status codes used by servers to communicate with your browser. When the 403 status code shows up on your screen, it means that your server thinks you do not have the required permission to access that particular page.

The 403 Forbidden error typically appears when you’re trying to log in to your WordPress admin area or when you visit a specific page on your site. You may also encounter it while installing WordPress.

The error is usually accompanied by one of the following messages (or similar variations):

  • “403 Forbidden – Access to this resource on the server is denied.”
  • “Forbidden – You don’t have permission to access [directory name] on this server.”
  • “You are not authorized to view this page.”
  • “It appears you don’t have permission to access this page.”
  • “403. That’s an error. Your client does not have permission to get URL [address] from this server.”

Instead of the “403 Forbidden” status, you might come across a simple notification that says “Access Denied.” It is also possible that you will get the following message: “Access to [domain name] was denied. You don’t have authorization to view this page.”

There are several possible causes of this 403 Forbidden error. The most likely one is an incorrect file permission on your server. However, this error can also be triggered by a faulty plugin or a corrupt .htaccess file:

DreamHost Glossary

What is .htaccess?

“.htaccess” is a configuration file used by the Apache web server software. The .htaccess file contains directives (instructions) that tell Apache how to behave for a particular website or directory.

Learn More

In most cases, you should be able to resolve the issue on your own. However, you might also need to get in touch with your hosting provider to access or change some settings on your site.

Skip the Permission Settings Stress

Avoid WordPress troubleshooting when you sign up for DreamPress. Our friendly experts are available 24/7 to help solve website problems — big or small.

How to Fix the 403 Forbidden Error in WordPress (5 Methods)

Now, let’s go through a few ways you can fix the 403 Forbidden error in WordPress. First, we recommend that you make a backup of your site just in case something goes wrong and you need to restore it to an earlier version.

1. Change Your File Permissions

Every WordPress file on your site’s server has its own permissions. These settings control who can access and modify its contents. If these files have incorrect permissions, your server will stop you from accessing them.

If you want to check your file permissions, you can simply contact your hosting provider, and a technical expert should be able to take care of it. You can also do this yourself by connecting to your site with a Secure File Transfer Protocol (SFTP) client such as FileZilla.

Alternatively, you can also access your site through the file manager in your hosting account. If you have a DreamHost account, you can navigate to WordPress > Managed WordPress in the sidebar. Then, find your domain and select Manage.

Accessing your domain in your DreamHost account.

On the next page, click on the Manage Files button in the Details section.

Accessing your file manager via your DreamHost account.

You’re now in the file manager. Next, open the folder labeled with your domain name to access your site’s directory.

Inside your root directory, select the folder that contains all of your WordPress files. If you’re using FileZilla, this is the public_html folder. Then, right-click on it and choose File Attributes.

Changing the file permissions using FileZilla

In the popup window, locate the Numeric field and enter “755” or “750” in the value box. Then select the Recurse into subdirectories and Apply to directories only options, and click on OK.

Changing the file permissions for the directories.

So far, you’ve applied the correct file permissions for your directories. You’ll now do the same thing for your files.

To start, right-click on your public_html folder and select File Attributes. This time, you’ll need to type “644” in the Numeric value field. Then choose Recurse into subdirectories, select Apply to files only, and click on OK.

Changing the file permissions in FileZilla.

Note that your wp-config.php file requires a different numeric value than the ones stated above. This unique value prevents other users on your servers from accessing the file. Therefore, you’ll need to manually change its file permission.

In your root directory, find the wp-config.php file, right-click on it, and select File permissions. Next, set the numeric value to “440”, and click on OK.

Changing the permissions for the wp-config.php file in FileZilla.

Now, every one of your WordPress files and folders should have the correct permissions. Once you’ve completed the above steps, go back to your site and try to reproduce the 403 Forbidden error. If your site is working fine, you don’t need to do anything else.

However, don’t worry if you’re still facing the same problem. There are still a few more fixes to try, and some of them are very simple.

2. Deactivate Your Plugins

As we mentioned earlier, the 403 Forbidden error can also be caused by a faulty plugin. To find out if this is the case, you’ll need to deactivate your plugins and then reactivate them one by one.

To start, connect to your site via FileZilla or the file manager in your hosting account. Then, in your site’s root directory, open the wp-content folder and locate the plugins folder. Then right-click on the plugins folder and select Rename.

How to rename the plugins folder in your site’s root directory.

Next, give the folder a new name, for example, “plugins_test. This will automatically deactivate all of your plugins.

If you can access your site after renaming the folder, then the 403 Forbidden error was caused by a glitchy plugin. Your next step is to find out which one it is.

First, return to your site’s root directory and rename the plugins folder back to “plugins”. Then navigate to the Plugins page in your WordPress dashboard and activate the plugins one at a time. Keep doing this until you are able to reproduce the error. Once you’ve identified the faulty plugin, you can either remove it or contact its developer for support.

3. Delete and Restore the .htaccess File

A corrupt .htaccess file can also trigger the 403 Forbidden error. This file is located in your site’s root directory and enables WordPress to interact with your server.

Inside your site’s root directory, locate the .htaccess file, right-click on it, and choose Delete.

Locating and deleting the .htaccess file in your site’s root directory.

Now, try accessing your site again. If the 403 Forbidden error has disappeared, then your .htaccess file may have been corrupted. This means you’ll need to create a new one.

To do this, navigate to Settings in your WordPress dashboard and select Permalinks. Then click on the Save Changes button at the bottom of the page, and a new .htaccess file will be generated. You can look for the file in your site’s directory to ensure that it has been restored.

4. Deactivate Your CDN

If you’re still getting the 403 Forbidden error after completing the above steps, you may have a problem with your Content Delivery Network (CDN). This is a network of servers located in different parts of the world, with each server hosting a copy of your website. Many hosting plans come with a CDN to help boost your site’s performance.

To see if your CDN is the cause of the error, you’ll need to temporarily disable it. You can do this by logging into your hosting account and locating your CDN settings. If you’re unable to access your CDN, we recommend getting in touch with your hosting provider.

5. Check Your Hotlink Protection

Finally, you might want to check your site’s hotlink protection. Hotlinking is when someone embeds media files on their site by linking them directly from another site. Some individuals may do this to use another site owner’s bandwidth (rather than their own), which is effectively theft.

Some hosts and CDN providers offer hotlink protection. However, if this is not set up properly, it can trigger a 403 Forbidden error on your site. Therefore, you may want to contact your web host about this issue. While you may want to look into this yourself, it’s best to get help from a technical expert to ensure that your hotlink protection is configured correctly.

Additional WordPress Resources

If you’re new to WordPress, you’re bound to run into some technical issues while setting up your site. To help you fix some of the most common WordPress errors, we’ve put together several how-to guides:

  • How to Fix Common WordPress Errors
  • How to Troubleshoot the WordPress White Screen of Death
  • How to Fix the 500 Internal Server Error in WordPress
  • How to Fix Syntax Errors in WordPress
  • How to Fix the WordPress Not Sending Email Issue
  • How to Fix the Error Establishing a Database Connection in WordPress
  • How to Fix WordPress Error 404 Not Found
  • How to Fix White Text and Missing Buttons in the WordPress Visual Editor
  • How to Fix the Sidebar Below Content Error in WordPress
  • What to Do When You’re Locked Out of the WordPress Admin Area
  • How to Fix the WordPress Memory Exhausted Error By Increasing Your Site’s PHP Memory Limit
  • How to Fix the “Upload: Failed to Write File to Disk” Error in WordPress

Meanwhile, if you’re looking for more WordPress tips and hacks, check out our WordPress Tutorials. This collection of guides will help you set up and design your first WordPress site like a professional.

Bye, WordPress 403 Error

The 403 Forbidden error appears when your server denies you permission to access a page on your site. This is mainly caused by a faulty security plugin, a corrupt .htaccess file, or incorrect file permissions on your server.

In this post, we looked at five main ways you can fix the 403 Forbidden error using an SFTP client like FileZilla or the file manager in your hosting account:

  1. Change your file permissions.
  2. Deactivate your plugins.
  3. Delete and restore the .htaccess file.
  4. Deactivate your CDN.
  5. Check your hotlink protection.

If you want to receive expert help when encountering WordPress errors, you may want to consider a managed WordPress hosting plan. Our DreamPress plans come with 24/7 technical support for WordPress site owners, so you can spend less time troubleshooting and focus your efforts on growing your business.

Содержание

  1. Ошибка 403 при установке плагинов WordPress
  2. Решение:
  3. WordPress 403 ошибка — Forbidden
  4. Причины появления ошибки 403 forbidden
  5. Как устранить ошибку 403
  6. Если ошибку 403 вызывает плагин WordPress
  7. Если ошибку 403 вызывает файл .htaccess
  8. Если ошибка 403 вызвана отказом в доступе к файлам
  9. Улучшаем безопасность вордпресса
  10. Как исправить ошибку 403 Forbidden в WordPress
  11. Что за ошибка 403 Forbidden – Access Denied Error в WordPress?
  12. Что вызывает ошибку 403 Forbidden в WordPress?
  13. Исправляем ошибку 403 Forbidden в WordPress
  14. 1. Исправляем ошибку 403 Forbidden, вызванную плагином WordPress
  15. 2. Исправляем ошибку 403 Forbidden, вызванную поврежденным файлом .htaccess
  16. 3. Исправляем ошибку 403 Forbidden, вызванную правами доступа к файлам в WordPress

Ошибка 403 при установке плагинов WordPress

После установки плагина iThemes Security часто возникает ситуация, когда новые плагины больше не хотят устанавливаться, выдавая ошибку.

Если ошибка выглядит вот как, то проблема, скорее всего, в настройках плагина.

Плагин iThemes Security призван обеспечить дополнительную защиту сайта на WordPress от взлома.
И одной из опций защиты является блокировка, если в URL сайта присутствуют не английские буквы.

Non-English Characters
Filter out non-english characters from the query string. This should not be used on non-english sites and only works when «Filter Suspicious Query String» has been selected.

По умолчанию эта опция отключена.
Если вы случайно ее включили, то у вас будет выдаваться ошибка You don’t have permission to access /wp-admin/plugin-install.php on this server при установке плагинов.

Снимите флажок, сохраните изменения и ошибка не будет больше возникать.

Но что делать, если вы не устанавливали iThemes Security, а проблема присутствует?
Вероятно, что у вас в настройках файла .htaccess, который отвечает в том числе за доступы к тем или иным файлам, прописаны запреты на доступ к некоторым служебным файлам.

# закрыть install.php

order allow,deny
deny from all

В результате данные файлы не доступны для запуска и появляется ошибка 403.

Решение:

1. Зайдите по FTP на ваш сайт (как зайти по FTP).
2. Сохраните копию данного файла перед правкой.
3. Затем удалите все подозрительные коды, которые могут блокировать запуск отдельных файлов и сохраните его в корне сайта.

Если не поможет, а проблема появилась буквально недавно, восстановите рабочий бекап сайта.
Нет бекапа? Напишите хостеру, у него он наверняка есть. Попросите вернуть файлы и базу данных сайта за конкретную дату.

Или в крайнем случае, обратитесь к профессиональному программисту-фрилансеру, обычно стоимость решения данной проблемы 5-10$ максимум. Но нанимать фрилансеров на бирже нужно правильно, читайте мои «золотые правила» работы с удаленными фрилансерами.

Если вы знаете другие причины возникновения ошибки 403 при установке плагинов и их решения — поделитесь в комментариях, мы вам будем признательны.

Полезные цитаты: Сегодня я богат именно благодаря тому, что я сделал в свободное время (Р.Кийосаки)

Источник

WordPress 403 ошибка — Forbidden

Ошибка WordPress 403 возникает из-за того, что запрещен доступ к страницам, которые пользователи пытаются посетить. Когда ваш сайт начинает отображать ошибку 403 Forbidden, это обычно означает, что запрос посетителя был отправлен и принят сервером, но сам сервер не дает доступ данному пользователю. Такая проблема довольно распространена – рассмотрим, почему она возникает и как восстановить доступ к сайту.

Причины появления ошибки 403 forbidden

Одна из частых причин образования ошибки 403 Forbidden связана с неудачной настройкой плагинов безопасности на сайте WordPress. Некоторые плагины, призванные обеспечить безопасность вашего сайта, могут заблокировать один или несколько IP-адресов, если посчитают их вредоносными.

Еще одна причина – ваша хостинговая компания может изменить настройки сервера. Это тоже способно вызвать на сайте ошибку 403 Forbidden.

Другой потенциальной причиной может оказаться некорректный файл .htaccess, а также неверные настройки доступа к каталогам и файлам сайта на удаленном сервере. В стандартно работающем файле .htaccess указаны настройки доступа через админку WordPress.

Если на третьей строке файла будет указано «Deny from all», эта команда установит запрет на посещение админпанели вашего сайта. В каких ситуациях может наблюдаться эта ошибка:

  • Отказано в доступе на странице входа в админку wp-admin или wp-login.
  • Ошибка обнаруживается в процессе установки WordPress.
  • Ошибка показывается при посещении любых страниц вашего сайта.

При этом ошибка на экране сопровождается соответствующим текстом типа фразы «Отказано в доступе», «У вас нет разрешения на просмотр этой страницы» или указывается полный статус ошибки 403.

Как устранить ошибку 403

Поскольку причины, вызывающие ошибку 403 хорошо известны, избавиться от нее просто. Но , прежде чем предпринять что-либо, рекомендуется сделать резервную копию сайта. Вы также можете развернуть локальную копию сайта и на ней искать причины ошибки. Это актуально, если сайт посещаемый, а ошибка появляется только при входе в админпанель.

Если ошибку 403 вызывает плагин WordPress

Не каждый плагин, который вы используете в WordPress, совместим с настройками вашего сайта. Чтобы убедиться, вызвана ли ошибка 403 некорректно работающим плагином, отключите все установленные плагины. Активируя их по одному, можно выяснить, какой именно плагин спровоцировал ошибку.

  1. Деактивируйте все плагины, установленные на сайте.
  2. Повторно активируйте один из плагинов в списке.
  3. Посетите сайт, чтобы увидеть, отображается ли ошибка 403.
  4. Повторите шаги 2 и 3, пока не отобразится ошибка 403.

Если проблема появления ошибки разрешится, значит причиной послужил один из установленных плагинов. Возможно, вам придется изменить его параметры конфигурации или полностью удалить.

Если после деактивации всех плагинов ошибка 403 все еще воспроизводится, проблема не связана с плагином. В этом случае нужно выполнить дополнительную диагностику.

Если ошибку 403 вызывает файл .htaccess

Файл .htaccess способен спровоцировать множество осложнений в работе сайта при неправильной настройке. Некорректный или измененный файл помешает пользователям зайти на страницы сайта. Есть два способа проверить файл .htaccess на сайте: с использованием подходящего плагина для WordPress или с помощью FTP-доступа.

  1. Подключитесь к сайту на удаленном сервере с использованием файлового менеджера.
  2. В корне сайта найдите файл .htaccess.
  3. Загрузите файл .htaccess на локальный компьютер, чтобы сделать его резервную копию.
  4. Удалите этот файл из корня сайта на сервере.

После этого попробуйте войти на ваш интернет-ресурс. Если ошибка 403 больше не появляется, значит файл был поврежден. Для создания нового файла .htaccess войдите в админ-панель WordPress в меню «Настройки» и выберите пункт «Постоянные ссылки». Внизу страницы щелкните по кнопке «Сохранить изменения», WordPress автоматически сформирует обновленный файл .htaccess. Изменять какие-либо текущие настройки при этом не требуется.

Если ошибка 403 вызвана отказом в доступе к файлам

Файлы и каталоги, которые хранятся на вашем веб-ресурсе, обладают настройками прав на доступ. Неправильные настройки способны спровоцировать ошибку 403.

Вы можете воспользоваться техподдержкой хостинг-провайдера и попросить проверить ваш сайт на корректность доступов к каталогам и файлам. Это также можно выполнить самостоятельно.

  1. Подключитесь к удаленному серверу с помощью файлового менеджера.
  2. Зайдите в корневой каталог сайта, где находится все его содержимое.
  3. Выберите папку, щелкните по ней правой кнопкой и найдите в выпадающем меню пункт «Права доступа к файлу».

FTP-менеджер отобразит диалоговое окно с настройками прав доступа. Все каталоги на сайте снабжены значением 744 или 755. Остальные варианты могут помешать добавлению в папку нового содержимого и предотвратят обновления, дополнения или изменения, которые могут потребоваться в будущем. Поставьте флажок «Перенаправить во вложенные каталоги» и выберите пункт «Применить только к каталогам». Подтвердите нажатием «ОК», FTP-программа установит права доступа на все подпапки в этом каталоге.

Повторите это действие для всех файлов на сайте. Файлы снабжаются правами доступа со значением 644 или 640. Если эти числа установлены неверно, это даст злоумышленникам возможность редактировать файлы, что грозит добавлением вредоносного кода в файлы сайта.

После нажатия «OK», FTP-программа настроит доступ на указанные файлы. После этого попробуйте перейти на ваш сайт, ошибка 403 больше не должна возникнуть.

Улучшаем безопасность вордпресса

В целях повышения безопасности и ограничения доступа к сайту для посторонних, можно прописать специальную команду в файле .htaccess, которая запретит вход в административную панель WordPress со всех IP-адресов, отличающихся от вашего.

Order deny,allow
Deny from all
Allow from 255.255.255.255

Вместо 255.255.255.255 укажите ваш IP-адрес. Если вы используете несколько динамических IP, в этом случае в файл .htaccess придется записать все подсети, с которых Вы заходите в админ-панель. Вы также можете защитить страницу входа, установив на нее дополнительный пароль.

iPipe – надёжный хостинг-провайдер с опытом работы более 15 лет.

  • Виртуальные серверы с NVMe SSD дисками от 299 руб/мес
  • Безлимитный хостинг на SSD дисках от 142 руб/мес
  • Выделенные серверы в наличии и под заказ
  • Регистрацию доменов в более 350 зонах

Источник

Как исправить ошибку 403 Forbidden в WordPress

Опубликовано: ADv Дата 21.02.2017 в рубрике Ошибки 6 комментариев

Вам пришлось столкнуться с ошибкой 403 Forbidden на своем сайте на WordPress? Это одна из самых страшных ошибок, с которой может столкнуться новичок. В этой статье м покажем вам как легко исправить ошибку 403 Forbidden в WordPress.

Что за ошибка 403 Forbidden – Access Denied Error в WordPress?

WordPress отображает коды и сообщения, когда ошибка возникает на сайте.

Код ошибки 403 Forbidden показывается тогда, когда права, установленные на сервере, не позволяют получить доступ к определенной странице.

Именно поэтому ошибку часто можно видеть с текстом:

Ошибку можно увидеть в различных ситуациях. Например:

  • 403 Forbidden – Запрещен доступ к wp-admin или странице входа в WordPress.
  • 403 Forbidden – во время установки WordPress.
  • 403 Forbidden при попытке открыть любую страницу на сайте.
  • Возможно, что вы получаете только сообщение ‘Access Denied’ вместо полного статуса 403 Forbidden.
  • Также можно увидеть ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’

Теперь, когда мы определили различные типы ошибок 403, давайте поговорим о том, что приводит к этим ошибкам.

Что вызывает ошибку 403 Forbidden в WordPress?

Наиболее вероятной причиной возникновения ошибки 403 Forbidden в WordPress являются плохо настроенные плагины безопасности. Многие из них блокируют IP адреса (или даже всю подсеть), если считают, что они вредоносны.

Второй возможной причиной может быть поврежденный файл .htaccess или некорректные права доступа к файлу на вашем сервере.

Ваш хостер также может внести какие-то изменения в настройки сервера, что может привести к рассматриваемой ошибке.

Давайте же посмотрим как можно исправить ошибку 403 forbidden в WordPress.

Исправляем ошибку 403 Forbidden в WordPress

Прежде чем что-либо сделать, мы рекомендуем вам создать полный бекап сайта.

1. Исправляем ошибку 403 Forbidden, вызванную плагином WordPress

Для начала вам потребуется временно отключить все плагины WordPress, включая все плагины безопасности, которые вы устанавливали.

Если это решит проблему, тогда станет понятно, что один из плагинов вызывает ошибку.

Выяснить, какой именно, можно будет, если отключить все плагины, а затем включать по одному, пока не появится ошибка 403.

2. Исправляем ошибку 403 Forbidden, вызванную поврежденным файлом .htaccess

Часто ошибка 403 возникает из-за поврежденного .htaccess файла вашего сайта. Починить его очень просто.

Подключаемся к сайту по FTP или через Менеджер файлов хостинга.

Находим файл .htaccess в корневой папке своего сайта.

Скачиваем файл на свой компьютер, чтобы у нас была свежая его копия. Далее, удаляем файл с сервера.

Пытаемся открыть свой сайт. Если ошибка 403 пропала, значит ваш .htaccess файл был поврежден.

Сгенерировать новый можно в админке сайта, если перейти на страницу Настройки » Постоянные ссылки.

Просто нажимаем на кнопку Сохранить изменения внизу страницы и WP сгенерирует свеженький файл .htaccess.

3. Исправляем ошибку 403 Forbidden, вызванную правами доступа к файлам в WordPress

Все файлы, хранимые на вашем сайте, имею права доступа. Эти права контролирует тот, у кого есть доступ к файлам и папкам сайта.

Некорректные права доступа могут вызывать ошибку 403, потому как ваш веб сервер начинает считать, что у вас нет прав на доступ к тем файлам.

Если два вышеуказанных решения не помогли с проблемой, тогда скорее всего дело в правах доступа.

Вы можете обратиться к своему хостеру для того, чтобы тот проверил сайт на предмет корректных прав доступа.

Изменение же прав самостоятельно может иметь негативные последствия. Если вы не слишком уверены в правильности своих действий, то лучше обратиться к знакомому или нанять профессионала.

Однако, если вы все-таки решите исправить проблему лично, то вот как можно проверить права доступа.

Просто подключаемся к своему сайту по FTP, а затем переходим в корневую директорию сайта, содержащую все файлы WordPress.

Кликните на директорию для выбора, затем нажмите правой кнопкой мыши, после чего выберите File Permissions из меню.

Ваш FTP клиент отобразит вам диалог изменения прав доступа вроде такого:

Все директории вашего сайта изменят права доступа с 744 на 755.

Все директории вашего сайта получат права доступа, изменив их с 644 на 644.

Можно изменить права доступа корневой директории с 744 на 755. Поставьте галочку рядом с ‘Recurse into subdirectories’, а затем отметьте опцию ‘apply to directories only’.

Нажимаем на кнопку ОК. Ваш FTP клиент начнет простановку прав доступа ко всем вложенным папкам в этой директории.

По окончанию процесса необходимо будет повторить проделанное для всех файлов. В этот раз вам нужно будет использовать права доступа 644 или 640 и не забыть выбрать опции ‘Recurse into subdirectories’ и ‘apply to files only’.

Нажимаем на кнопку ОК. Ваш FTP клиент обработает права доступа ко всем вложенным папкам в этой директории.

Попробуйте зайти на свой сайт, и ошибка 403 forbidden должна исчезнуть.

Мы надеемся, что эта статья помогла вам исправить ошибку 403 forbidden в WordPress.

По всем вопросам и отзывам просьба писать в комментарии ниже.

Не забывайте, по возможности, оценивать понравившиеся записи количеством звездочек на ваше усмотрение.

Источник

Вам пришлось столкнуться с ошибкой 403 Forbidden на своем сайте на WordPress? Это одна из самых страшных ошибок, с которой может столкнуться новичок. В этой статье м покажем вам как легко исправить ошибку 403 Forbidden в WordPress.

403forbiddenerror[1]

Что за ошибка 403 Forbidden – Access Denied Error в WordPress?

WordPress отображает коды и сообщения, когда ошибка возникает на сайте.

403screenshot[1]

Код ошибки 403 Forbidden показывается тогда, когда права, установленные на сервере, не позволяют получить доступ к определенной странице.

Именно поэтому ошибку часто можно видеть с текстом:

403 Forbidden – You don’t have permission to access ‘/’ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Ошибку можно увидеть в различных ситуациях. Например:

  • 403 Forbidden – Запрещен доступ к wp-admin или странице входа в WordPress.
  • 403 Forbidden – во время установки WordPress.
  • 403 Forbidden при попытке открыть любую страницу на сайте.
  • Возможно, что вы получаете только сообщение ‘Access Denied’ вместо полного статуса 403 Forbidden.
  • Также можно увидеть ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’

Теперь, когда мы определили различные типы ошибок 403, давайте поговорим о том, что приводит к этим ошибкам.

Что вызывает ошибку 403 Forbidden в WordPress?

Наиболее вероятной причиной возникновения ошибки 403 Forbidden в WordPress являются плохо настроенные плагины безопасности. Многие из них блокируют IP адреса (или даже всю подсеть), если считают, что они вредоносны.

Второй возможной причиной может быть поврежденный файл .htaccess или некорректные права доступа к файлу на вашем сервере.

Ваш хостер также может внести какие-то изменения в настройки сервера, что может привести к рассматриваемой ошибке.

Давайте же посмотрим как можно исправить ошибку 403 forbidden в WordPress.

Исправляем ошибку 403 Forbidden в WordPress

Прежде чем что-либо сделать, мы рекомендуем вам создать полный бекап сайта.

1. Исправляем ошибку 403 Forbidden, вызванную плагином WordPress

Для начала вам потребуется временно отключить все плагины WordPress, включая все плагины безопасности, которые вы устанавливали.

Если это решит проблему, тогда станет понятно, что один из плагинов вызывает ошибку.

Выяснить, какой именно, можно будет, если отключить все плагины, а затем включать по одному, пока не появится ошибка 403.

2. Исправляем ошибку 403 Forbidden, вызванную поврежденным файлом .htaccess

Часто ошибка 403 возникает из-за поврежденного .htaccess файла вашего сайта. Починить его очень просто.

Подключаемся к сайту по FTP или через Менеджер файлов хостинга.

Находим файл .htaccess в корневой папке своего сайта.

Скачиваем файл на свой компьютер, чтобы у нас была свежая его копия. Далее, удаляем файл с сервера.

delete-htaccess[1]

Пытаемся открыть свой сайт. Если ошибка 403 пропала, значит ваш .htaccess файл был поврежден.

Сгенерировать новый можно в админке сайта, если перейти на страницу Настройки » Постоянные ссылки.

regenerate-htaccess[1]

Просто нажимаем на кнопку Сохранить изменения внизу страницы и WP сгенерирует свеженький файл .htaccess.

3. Исправляем ошибку 403 Forbidden, вызванную правами доступа к файлам в WordPress

Все файлы, хранимые на вашем сайте, имею права доступа. Эти права контролирует тот, у кого есть доступ к файлам и папкам сайта.

Некорректные права доступа могут вызывать ошибку 403, потому как ваш веб сервер начинает считать, что у вас нет прав на доступ к тем файлам.

Если два вышеуказанных решения не помогли с проблемой, тогда скорее всего дело в правах доступа.

Вы можете обратиться к своему хостеру для того, чтобы тот проверил сайт на предмет корректных прав доступа.

Изменение же прав самостоятельно может иметь негативные последствия. Если вы не слишком уверены в правильности своих действий, то лучше обратиться к знакомому или нанять профессионала.

Однако, если вы все-таки решите исправить проблему лично, то вот как можно проверить права доступа.

Просто подключаемся к своему сайту по FTP, а затем переходим в корневую директорию сайта, содержащую все файлы WordPress.

check-file-permissions[1]

Кликните на директорию для выбора, затем нажмите правой кнопкой мыши, после чего выберите File Permissions из меню.

Ваш FTP клиент отобразит вам диалог изменения прав доступа вроде такого:

changefilepermissions[1]

Все директории вашего сайта изменят права доступа с 744 на 755.

Все директории вашего сайта получат права доступа, изменив их с 644 на 644.

Можно изменить права доступа корневой директории с 744 на 755. Поставьте галочку рядом с ‘Recurse into subdirectories’, а затем отметьте опцию ‘apply to directories only’.

Нажимаем на кнопку ОК. Ваш FTP клиент начнет простановку прав доступа ко всем вложенным папкам в этой директории.

По окончанию процесса необходимо будет повторить проделанное для всех файлов. В этот раз вам нужно будет использовать права доступа 644 или 640 и не забыть выбрать опции ‘Recurse into subdirectories’ и ‘apply to files only’.

Нажимаем на кнопку ОК. Ваш FTP клиент обработает права доступа ко всем вложенным папкам в этой директории.

Попробуйте зайти на свой сайт, и ошибка 403 forbidden должна исчезнуть.

Мы надеемся, что эта статья помогла вам исправить ошибку 403 forbidden в WordPress.

По всем вопросам и отзывам просьба писать в комментарии ниже.

Не забывайте, по возможности, оценивать понравившиеся записи количеством звездочек на ваше усмотрение.

Rating: 3.3/5 (23 votes cast)

WordPress 403 ошибка - Forbidden

Ошибка WordPress 403 возникает из-за того, что запрещен доступ к страницам, которые пользователи пытаются посетить. Когда ваш сайт начинает отображать ошибку 403 Forbidden, это обычно означает, что запрос посетителя был отправлен и принят сервером, но сам сервер не дает доступ данному пользователю. Такая проблема довольно распространена – рассмотрим, почему она возникает и как восстановить доступ к сайту.

Причины появления ошибки 403 forbidden

Одна из частых причин образования ошибки 403 Forbidden связана с неудачной настройкой плагинов безопасности на сайте WordPress. Некоторые плагины, призванные обеспечить безопасность вашего сайта, могут заблокировать один или несколько IP-адресов, если посчитают их вредоносными.

Еще одна причина – ваша хостинговая компания может изменить настройки сервера. Это тоже способно вызвать на сайте ошибку 403 Forbidden.

Другой потенциальной причиной может оказаться некорректный файл .htaccess, а также неверные настройки доступа к каталогам и файлам сайта на удаленном сервере. В стандартно работающем файле .htaccess указаны настройки доступа через админку WordPress.

htaccess вордпресс

Если на третьей строке файла будет указано «Deny from all», эта команда установит запрет на посещение админпанели вашего сайта. В каких ситуациях может наблюдаться эта ошибка:

  • Отказано в доступе на странице входа в админку wp-admin или wp-login.
  • Ошибка обнаруживается в процессе установки WordPress.
  • Ошибка показывается при посещении любых страниц вашего сайта.

При этом ошибка на экране сопровождается соответствующим текстом типа фразы «Отказано в доступе», «У вас нет разрешения на просмотр этой страницы» или указывается полный статус ошибки 403.

Поскольку причины, вызывающие ошибку 403 хорошо известны, избавиться от нее просто. Но , прежде чем предпринять что-либо, рекомендуется сделать резервную копию сайта. Вы также можете развернуть локальную копию сайта и на ней искать причины ошибки. Это актуально, если сайт посещаемый, а ошибка появляется только при входе в админпанель.

Не каждый плагин, который вы используете в WordPress, совместим с настройками вашего сайта. Чтобы убедиться, вызвана ли ошибка 403 некорректно работающим плагином, отключите все установленные плагины. Активируя их по одному, можно выяснить, какой именно плагин спровоцировал ошибку.

  1. Деактивируйте все плагины, установленные на сайте.
  2. Повторно активируйте один из плагинов в списке.
  3. Посетите сайт, чтобы увидеть, отображается ли ошибка 403.
  4. Повторите шаги 2 и 3, пока не отобразится ошибка 403.

Если проблема появления ошибки разрешится, значит причиной послужил один из установленных плагинов. Возможно, вам придется изменить его параметры конфигурации или полностью удалить.

Если после деактивации всех плагинов ошибка 403 все еще воспроизводится, проблема не связана с плагином. В этом случае нужно выполнить дополнительную диагностику.

Если ошибку 403 вызывает файл .htaccess

Файл .htaccess способен спровоцировать множество осложнений в работе сайта при неправильной настройке. Некорректный или измененный файл помешает пользователям зайти на страницы сайта. Есть два способа проверить файл .htaccess на сайте: с использованием подходящего плагина для WordPress или с помощью FTP-доступа.

  1. Подключитесь к сайту на удаленном сервере с использованием файлового менеджера.
  2. В корне сайта найдите файл .htaccess.
  3. Загрузите файл .htaccess на локальный компьютер, чтобы сделать его резервную копию.
  4. Удалите этот файл из корня сайта на сервере.

htaccess вордпресс

После этого попробуйте войти на ваш интернет-ресурс. Если ошибка 403 больше не появляется, значит файл был поврежден. Для создания нового файла .htaccess войдите в админ-панель WordPress в меню «Настройки» и выберите пункт «Постоянные ссылки». Внизу страницы щелкните по кнопке «Сохранить изменения», WordPress автоматически сформирует обновленный файл .htaccess. Изменять какие-либо текущие настройки при этом не требуется.

wp links

Если ошибка 403 вызвана отказом в доступе к файлам

Файлы и каталоги, которые хранятся на вашем веб-ресурсе, обладают настройками прав на доступ. Неправильные настройки способны спровоцировать ошибку 403.

Вы можете воспользоваться техподдержкой хостинг-провайдера и попросить проверить ваш сайт на корректность доступов к каталогам и файлам. Это также можно выполнить самостоятельно.

  1. Подключитесь к удаленному серверу с помощью файлового менеджера.
  2. Зайдите в корневой каталог сайта, где находится все его содержимое.
  3. Выберите папку, щелкните по ней правой кнопкой и найдите в выпадающем меню пункт «Права доступа к файлу».

FTP-менеджер отобразит диалоговое окно с настройками прав доступа. Все каталоги на сайте снабжены значением 744 или 755. Остальные варианты могут помешать добавлению в папку нового содержимого и предотвратят обновления, дополнения или изменения, которые могут потребоваться в будущем. Поставьте флажок «Перенаправить во вложенные каталоги» и выберите пункт «Применить только к каталогам». Подтвердите нажатием «ОК», FTP-программа установит права доступа на все подпапки в этом каталоге.

Повторите это действие для всех файлов на сайте. Файлы снабжаются правами доступа со значением 644 или 640. Если эти числа установлены неверно, это даст злоумышленникам возможность редактировать файлы, что грозит добавлением вредоносного кода в файлы сайта.

После нажатия «OK», FTP-программа настроит доступ на указанные файлы. После этого попробуйте перейти на ваш сайт, ошибка 403 больше не должна возникнуть.

доступ к файлу

Улучшаем безопасность вордпресса

В целях повышения безопасности и ограничения доступа к сайту для посторонних, можно прописать специальную команду в файле .htaccess, которая запретит вход в административную панель WordPress со всех IP-адресов, отличающихся от вашего.


<FilesMatch "(wp-login.php|wp-admin)">
Order deny,allow
Deny from all
Allow from 255.255.255.255
</FilesMatch>

Вместо 255.255.255.255 укажите ваш IP-адрес. Если вы используете несколько динамических IP, в этом случае в файл .htaccess придется записать все подсети, с которых Вы заходите в админ-панель. Вы также можете защитить страницу входа, установив на нее дополнительный пароль.

iPipe – надёжный хостинг-провайдер с опытом работы более 15 лет.

Мы предлагаем:

  • Виртуальные серверы с NVMe SSD дисками от 299 руб/мес
  • Безлимитный хостинг на SSD дисках от 142 руб/мес
  • Выделенные серверы в наличии и под заказ
  • Регистрацию доменов в более 350 зонах

Добрый день дорогие друзья! У меня вопрос сталкивались ли вы когда-нибудь с 403 ошибкой на вашем Вордпресс сайте? Это одна из пугающих ошибок с которой могут столкнуться новички, да наверное, как и со всеми другими ошибками на сайте. В этой статье мы расскажем как ее исправить.

403 ошибка - доступ запрещен

Содержание

  • 1 Что значит 403 ошибка – доступ запрещен на WordPress?
  • 2 Каковы причины возникновения 403 ошибки запрета доступа?
  • 3 Устранение ошибки в WordPress
    • 3.1 Исправление 403 ошибки, вызванной работой WordPress плагинов.
    • 3.2 Исправление 403 ошибки, вызванной повреждением файла .htaccess
    • 3.3 Исправление 403 ошибки, вызванной правами доступа к файлам WordPress
    • 3.4 Рекомендую ознакомиться с этими статьями:

Сама цмс вордпресс показывает коды и сообщения при возникновении ошибки на вашем сайте. Смотрите наиболее общий список ошибок и как их исправить:

Сообщение 403 ошибки

Данное сообщение показывается в том случае, когда ваш сервер не разрешает доступ к какой –то конкретной странице. Поэтому данная ошибка обычно сопровождается следующим текстом:

403 Forbidden – You don’t have permission to access ‘/’ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Существуют различные сценарии, когда вы можете ее увидеть, например:

  • 403 Forbidden — Access denied on wp-admin or WordPress login page (Доступ запрещен к разделу wp-admin или странице «залогинивания»)
  • 403 Forbidden – during WordPress install (В течение установки блога Вордпресс).
  • 403 Forbidden error when visiting any page on your WordPress site. (Когда посещаете всякую страницу на wordpress сайте).

Также вполне возможно вы увидите просто текст «Access Denied» (Доступ запрещен), вместо полного текста статуса об ошибке.

Также вы можете увидеть и такой мессидж «Access to yourdomain.com was denied. You don’t have authorization to view this page» (Доступ к сайту с вашим доменом был запрещен. Вы не можете авторизоваться, чтобы увидеть данную страницу).

Теперь вы уже знаете о различных типах 403 ошибки, теперь давайте поговорим о том, что ее вызывает.

Каковы причины возникновения 403 ошибки запрета доступа?

Наиболее частой и распространенной причиной, что служит образованию данной ошибки – это плохо настроенные плагины безопасности. Многие из них могут блокировать IP адрес (или целый диапазон адресов), поскольку считают их вредоносными.

Именно поэтому мы используем плагин Sucuri для повышения безопасности для всех наших вордпресс сайтов.

Другой возможной причиной может стать повреждение файла .htaccess или некорректный файл доступов на вашем сервере.

Иногда хостинг провайдеры могут сделать случайные изменения в настройках их серверов и это также может послужить причиной возникновения данной ошибки.

Говоря все это, давайте посмотрим, а как можно решить возникающую 403 ошибку WordPress.

Устранение ошибки в WordPress

Прежде чем мы начнем делать какие-либо изменения в файлах сервера и блога, настоятельно рекомендую сделать резервную копию сайта. Если же вы используете автоматический способ создания бэкапов, то убедитесь, что у вас есть доступ к последней его копии.

Исправление 403 ошибки, вызванной работой WordPress плагинов.

Первое, что вам нужно сделать это последовательно отключить (деактивировать, но не удалять) любые плагины на вашем сайте, которые отвечают за безопасность. Если это решит вашу проблему, значит именно он был причиной ошибки.

Также вы можете выяснить причину, включая все плагины по одному за раз, пока не воспроизведете 403 ошибку.

Исправление 403 ошибки, вызванной повреждением файла .htaccess

Другой случай ошибки может быть связан с повреждением файла .htaccess на вашем хостинге. Восстановить его достаточно легко. Прежде всего необходимо подключиться к вашему хостингу через FTP клиент или зайти напрямую в панель вашего хостинга. Затем находите его в корневой папке с вашим сайтом и скачиваете. После этого удаляем .htaccess с вашего сервера.

Удаление файла htacces

Теперь попробуйте получить доступ к вашему сайту. Если ошибки не было, то причина была в нем. Вы можете сгенерировать свежий файл .htaccess, войдя внутрь админ панели WordPress и зайдя в раздел Постоянные ссылки (Permalinks).

Генерируем новый файл htaccess

Затем просто нажимаете на синюю кнопку и сохраняете изменения. В результате ваших действий будет сгенерирован новый .htaccess файл.

Исправление 403 ошибки, вызванной правами доступа к файлам WordPress

Все файлы, находящиеся на вашем сайте (хостинге) имеют определенные права доступа. Эти права регулируют того, кто может получить доступ к файлам и папкам на вашем сайте.

Некорректные права доступа к файлам и папкам как раз и могут стать причиной возникновения 403 ошибки. Это заставляет ваш веб сервер думать, что вы не обладаете правами для доступа к ним.

Если вышеупомянутые решения не разрешают данную ошибку на сайте, то некорректные права доступа к файлам являются самой распространенной причиной.

Здесь вы можете спросить у своего хостинг провайдера корректность прав доступа к файлам и папкам на вашем аккаунте. Они это сделают без проблем для вас. Если же вы делаете все самостоятельно, то при неправильных действиях это может повлечь за собой серьезные последствия. Если чувствуете, что не уверены, то лучше доверить профессионалам или попросить знающих друзей. В том случае, когда вы уверены, что хотите сделать все сами, то вот вам инструкция как проверить права доступа к файлам.

Подключитесь к вашему сайту с помощью ФТП клиента. Перейдите в корневую папку (как правило это public_html), которая содержит все файлы сайта.

Проверки прав доступа к файлам и папкам сайта

Кликните на выбранную вами папку и нажмите правую клавишу мыши и спуститесь до раздела «Права доступа» (File Permission) в контекстном меню.

Ваш ФТП клиент покажет вам следующее диалоговое окно:

Смена прав доступа на файлы и папки

Все папки на вашем сайте должны иметь разрешение 744 или 755. Все файлы на сайте также должны иметь права доступа к ним 644 или 640.

Вы можете установить права доступа к файлам 744 или 755. Установите флажок рядом с параметром «Recurse into subdirectories» и переключите радио кнопку рядом с пунктом «Применить только к папкам» (Apply to directories only). Нажмите на кнопку Ок. Теперь ваш фтп клиент начнет установку прав доступа ко всем подразделам в выбранной папке.

Как только это будет сделано, вам нужно повторить данный процесс, но уже для всех файлов. На этот раз вы будете использовать разрешение 640 или 644 и не забудьте установить флажок в позицию «Recurse into subdirectories» и выбрать «Применить ко всем файлам» (Apply to files only). Нажимаете ОК и все перезапишется.

Попробуйте получить доступ к вашему сайту сейчас и 403 ошибка должна исчезнуть сразу.

Я надеюсь, что данная статья помогла вам разобраться и устранить возможные причины возникновения 403 ошибки WordPress.

You must have encountered some common errors while trying to access your WordPress site that shows a forbidden message.  You likely came across a 403 forbidden error. In this guide, we will take you through how to fix the 403 error code. We will cover detailed information on how to resolve the issue so without any further delay let’s get started.

What does 403 Forbidden mean?

403 forbidden error or 403 forbidden access to this resource on the server is denied! is one of the HTTP errors that you face while working on WordPress. There are some HTTP status codes defined by Microsoft’s Internet Information Services which are considered standard internet codes.

These codes are used by web servers to communicate with your web browsers (like Chrome, Firefox, Opera, etc.). These codes are defined within the HTTP header. In normal circumstances when the website is working fine, the server sends Status Code as 200.

403 forbidden error

403 Forbidden Error

In case there is something wrong with the requested resource, it returns an error code. There are lots of error codes used by HTTP, for example, a 404 error is returned for a resource not found and a 500 error code signifies an internal server error. Another such HTTP response code is 403 which signifies that the user is prohibited or forbidden to access the requested web resource, which exists on the web server. We have tried to resolve all the common errors like 404 error, 504 gateway timeout error, 502 bad gateway error, etc faced while working on WordPress.

These types of errors are classified into two categories, they are either “client-side” errors or they are “server-side” errors.

Example of Client-Side Errors:

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found, and
  • 408 Request Timeout Error

Example of Server Side Errors:

  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable and
  • 504 Gateway Timeout

To make the identification of these HTML errors easier 4xx are client-side errors, while 5xx are server-side errors.

In this article, we will learn about the reasons for 403 errors, and possible ways to troubleshoot them for your visitors to easily access your website or web application without any errors.

Different browsers show different messages for the 403 error :

  • Forbidden: You don’t have permission to access / on this server.
  • HTTP Error 403 – Forbidden
  • 403 forbidden requests forbidden by administrative rules
  • 403 Forbidden
  • Access Denied You don’t have permission to access
  • 403 – Forbidden: Access is denied
  • Error 403 – Forbidden
  • 403 forbidden nginx– You are not allowed to access this address 403 Forbidden – Nginx HTTP Error 403 – Forbidden – You do not have permission to access the document or program you    requested
  • 403 Forbidden – Access to this resource on the server is denied
  • 403. That’s an error. Your client does not have permission to get URL / from this server
  • You are not authorized to view this page

What are the Causes of 403 Forbidden Error?

  • Incorrect File Permissions
  • No Index file or Empty Folder

1. Incorrect File Permissions:

The most common reason behind this error is files and folder permissions on the webserver. This can be easily fixed by going into your File Manager under cPanel and checking the permission settings. We will discuss the issue in detail in the subsequent sections.

The ideal folder permissions on a web server should look like this:

  • Permission Status for Folders:  755
  • Static Content: 644
  • Dynamic Content: 700

Understanding File Permissions

  • 7 : Stands for full access (Read, Write, Execute)
  • 6 : for the Only Read and Write Access
  • 5 : Stands for Reading and Execute
  • 4 : Only Read Access
  • 0 : Stands for No Access Rights

The 3 digits in the permission codes specify Owner | Group | Public in that order

So, if a folder permission codes look like 7|5|4 it means the owner has full access (7), while Group can Read and Execute (5) while Public/Everyone else can only Read (4) the resource.

These codes can be changed under File Manager if you are using a Cpanel. File permissions can also be changed using an FTP tool like Filezilla.

What does the Read/Write/Execute means?

  • Read – view the files and subfolders within the folder.
  • Write – add, edit or delete the files and subfolders inside the folder
  • Execute – process/execute the resources using a script or commands to change their value.

Setting File Permission using FTP Tool like Filezilla

Setting File Permission using FTP Tool like Filezilla

Setting File Permission using FTP Tool like Filezilla

Setting File Permission using FTP Tool like Filezilla Error 403

Setting File Permission using FTP Tool like Filezilla

Setting File Permission using File Manager in Cpanel

Setting File Permission using File Manager in Cpanel

Setting File Permission using File Manager in Cpanel

Setting File Permission using File Manager in Cpanel

Setting File Permission using File Manager in Cpanel

Folder permissions can also be changed using SSH under chmod commands.

2. No Index file or Empty Folder:

One of the other reasons for this error is the empty Http directory, or in other words, no website or web application files are uploaded to the server directory.

The default landing page for a website or web application is index.html or index.php. The server will return a 403 error status if none of the 2 exists on the server. Or you have defined some other file in Nginx config or .htaccess as the home page, and that file is not uploaded in the directory.

These are some of the common reasons behind the 403 Forbidden errors.

The other specific reasons and level of resource access forbidding can be determined by identifying the sub-status code, which is as follows (though they are not standard codes):

  • 403.1 – Execute access forbidden.
  • 403.2 – Read access is forbidden.
  • 403.3 – Write access forbidden.
  • 403.4 – SSL required
  • 403.5 – SSL 128 required.
  • 403.6 – IP address rejected.
  • 403.7 – Client certificate required.
  • 403.8 – Site access denied.
  • 403.9 – Too many users.
  • 403.10 – Invalid configuration.
  • 403.11 – Password change.
  • 403.12 – Mapper denied access.
  • 403.13 – Client certificate revoked.
  • 403.14 – Directory listing denied.
  • 403.15 – Client Access Licenses exceeded.
  • 403.16 – Client certificate is untrusted or invalid.
  • 403.17 – Client certificate has expired or is not yet valid.
  • 403.18 – Cannot execute request from that application pool.
  • 403.19 – Cannot execute CGIs for the client in this application pool.
  • 403.20 – Passport logon failed.
  • 403.21 – Source access denied.
  • 403.22 – Infinite depth is denied.
  • 403.502 – Too many requests from the same client IP; Dynamic IP Restriction limit reached.
  • 403.503 – Rejected due to IP address restriction

Based on one of the identified above sub-status error codes you can easily troubleshoot the error.

On WordPress, there can be additional events that can cause a temporary 403 Forbidden error in cases like:

  • Access denied to WordPress Dashboard. In that case, you have to check the settings for the wp-admin directory.
  • Access may be denied during WordPress installation
  •  Access may be denied during theme or plugin updates

How to Fix 403 Forbidden Error on Your WordPress Website?

Fixes of 403 Forbidden Error in a WordPress Site

Fixes of 403 Forbidden Error in a WordPress Site

Irrespective of the platform, most of the troubleshooting methods apply to all the websites. You can use these methods to resolve the “403 forbidden access to this resource on the server is denied!” Error –

  • Check Missing Core Files and Theme Files
  • Check .htaccess file configuration
  • Directory Browsing and 403 Error
  • Check file and folder permissions
  • Check Plugins
  • Clear Browser Cache and Cookies
  • Try to fix issues from your Chrome Browser
  • Deactivate Browser Extensions
  • Check Firewall Settings

First things first, before making any changes we recommend you take a backup of your files and database. In case you are using WordPress and can access the WordPress Dashboard you can take the help of a backup plugin. We recommend using a backup plugin that creates automatic backups at regular intervals.

Check Missing Core Files and Theme Files:

Please check that all WordPress Core Files are in place, you can upload the core files manually using a File Transfer tool.

Also, check that all these files are properly uploaded. Specially check the index.php files at root, inside wp-admin, theme folder, and individual plugin folders.

Eliminate Server Error Risks!

WPOven

Check .htaccess file configuration:

.htaccess is a hidden file in the public_html directory of your Apache-based web server. The function of the .htaccess file is to define the web response to various queries, especially to set up the redirects, restrict access to various bots, etc. In some cases, there are differences .htaccess files for the root directory and subdirectories in WordPress like wp-admin and wp-includes.

To access this hidden file you can go to File Manager, and select the hidden checkbox in the options provided in the pop up as shown in the image below:

Check .htaccess file configuration: Error 403

Check .htaccess file configuration

If a pop-up doesn’t appear you can go to Settings under File Manager at Top Right as shown below:

Check .htaccess file configuration: Error 403

Check .htaccess file configuration

Once you have selected to show the hidden files you will be able to see the .htaccess file

Check .htaccess file configuration: Error 403

Check .htaccess file configuration

You can download it to your local machine and edit using an editor, a Notepad, Dreamweaver, or any other similar editing tool.

You can also right-click on it and Edit it as shown below:

Check .htaccess file configuration Error 403

Check .htaccess file configuration

This will open up an editable file like this:

Check .htaccess file configuration: Error 403

Check .htaccess file configuration

If a .htaccess file is not yet created on your system, you can create it as well. To create it go into your public_html folder, or the website-specific default folder if you have hosted multiple websites on your Cpanel, and click on Add New File:

Check .htaccess file configuration: 403 forbidden

Check .htaccess file configuration

.htaccess 403 forbidden

.htaccess 403 forbidden

So, if your WordPress website is facing a 403 forbidden error issue, and a .htaccess file exists, delete it and try to access the website or the specific page with the issue. If it works fine it means that your .htaccess file was not configured correctly. If you don’t want to delete the .htaccess file, you can just remove all the code and save the empty file instead.

You can regenerate the fresh .htaccess file now from your WordPress Dashboard. You will have to go to Permalinks under Settings, as shown below:

Permalinks under Settings Error 403

Permalinks under Settings Error 403

And Click on the Save Changes button. Please note, you don’t have to change the settings here unless you want to change the permalink settings or URL structure.

Directory Browsing and 403 Error:

Directory browsing simply means in absence of a default home page file (index.php or index.html) the server will display the directory content to the visitor. A visitor will be able to see files and subfolders of the main folder and certainly, you don’t want to display it, as shown below:

Directory Browsing and 403 Error

Directory Browsing

Most of the servers by default disallow directory browsing to hide the content of the folder. In such cases, if the default root file (index.html or index.php) is missing the server will return a 403 Forbidden error.

How to Disable Directory Browsing using the .htaccess file?

Open the editable .htaccess file, as described in the previous section. (Note: remember to back up the existing .htaccess file)

By default the WordPress .htaccess file looks like this:

#BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} ! - f
RewriteCond %{REQUEST_FILENAME} ! - d
RewriteRule . /index.php [L]
#END WordPress

Just add this line of the code after the last line:

Options -Indexes

Update or Upload the edited .htaccess file, and refresh the page to see if the problem is resolved.

Check file and folder permissions:

The default file permission settings are applied to the core file and folders when WordPress is installed or a new file or folder is created in your Cpanel.
You can go to each folder and change the permission settings. You can do it for specific files as well. Some hosting providers also provide tools to reset the permission settings.

You can also edit permission settings using the FTP tool (Filezilla for example). It will give you additional options as follows:

Directory Browsing and 403 Error

Directory Browsing and 403 Error
  • Permission settings to be only applied to selected directories or files
  • It is to be applied in all subdirectories and files within the selected directory
  • Also, it is to be applied only in all subdirectories within the selected directory
  • Permissions settings are to be applied only in all files within the selected directory

Following are the default permission settings for WordPress Files:

  • First of all change permission settings to 755 or 750 for all the directories
  • Change permissions settings to 644 or 640 for all the files (select the “Apply to files only” option)

Note: There is an exception to the above rule for the wp-config.php file. The Wp Config file is used to connect WP files to the Database. It includes the necessary database name, DB username, and password. The file permission for wp-config should either be 440 or 400.

Changing the permission settings accordingly should resolve the 403 forbidden error issues.

Caution: Perform this step when you are sure about what you are doing. It is an expert job. Playing around with file permissions can lead to compromising your website or server’s security. Incorrectly configured file permissions can leave a gate open for hackers or malware.

Check Plugins:

If the issue is still not resolved you need to check if there is a plugin that is causing the issue.

To do this first deactivate and uninstall any of the recently installed plugins. If it resolves the issue you can identify the incompatible plugin.

If still, the problem persists, deactivate the other plugins one by one and check the website. You will be able to identify the problematic plugin, and you can replace it with another plugin that provides similar functionality.

  • Deactivate all the plugins from your WordPress Dashboard
  • Check the website if it works now.
  • If it works Re-activate the plugins one by one to identify the problematic ones.
  • Repeat steps two and three until the 403 error is shown.
  • Congratulations, you have identified the plugin that is causing the problem.
  • You may need to delete it entirely and replace it with another plugin with similar functionality.

One of the other lesser recommended methods of deactivating plugins is changing the name of the Plugins folder to something else. You can also change the name of individual plugin folders one by one If you follow this process of changing folder names, you will see several errors in your WordPress dashboard stating that “Plugin file doesn’t exist”. Don’t panic seeing this error message as it will be fine once the folder name is changed back to what it was originally. You will have to activate them again from WP Dashboard after changing them back to their original name.

Note: Most of the time the issue is found with either one of the caching plugins or the security plugins. So keep an eye on these plugins.

“403 forbidden access to this resource on the server is denied!” Error in WordPress Multisite

If you have WordPress Multisite installation and getting a 403 error the chances are you have created a wildcard subdomain.

Just change it to remove the wildcard setting for a subdomain, and it should resolve the issue.

You also need to check the subdomain redirects.

subdomain redirects

subdomain redirects

How to Fix 403 Forbidden Error on Google Chrome?

ixes of 403 Forbidden Error on Google Chrome

Fixes of 403 Forbidden Error on Google Chrome

Sometimes your chrome browser can also be the culprit to trigger 403 forbidden errors. So, you resolve this issue from the chrome browser, there are certain methods you need to follow:

Some Quick and easy Solutions you must try at first:

  • Refresh or Reload: Sometimes, the 403 forbidden error can trigger due to temporary glitches that can be eliminated by simply refreshing or reloading the webpage on Google chrome. Just click on the refresh button on the chrome browser and you are done.
  • Try accessing the page after some time: sometimes, the server issue or the glitch can extend and might take a longer time than usual to resolve. If accessing the website is not on your priority list, you can wait for a few hours or even a day and try accessing it again. However, if you can’t wait and accessing the website is the utmost priority you can move on to other methods mentioned below:
  • Incorrect Typed URL: It truly said, ” hurry-hurry spoils the curry”. Generally, users in a hurry type incorrect or misspelled URLs in the browser address bar, and the outcome result in these type of errors. So you must review your typed URL before pressing the enter key, and make sure the URL is 100% correct.
  • Check on multiple devices or connections: You must also try to access the same website on multiple devices using the same network. If the error persists, move on to another internet connection and check if the error is due to the device or the internet connection.
  • Reset to default settings: If none of the above methods work, try to reset everything from the browser to your wifi router to their default settings.

Clear Chrome Browser Cache and Cookies

If you are still seeing a 403 Forbidden error try deleting the specific cookies of your web browser. This is how website-specific cookies are deleted in Google Chrome:

  • Open Chrome.
  • Click on More Settings
  • Next, click on Advanced.
  • In this menu, find ‘Content settings’ Under “Privacy and security”
  • Click on ‘Cookies’.
  • Under “All cookies and site data,” search for the website’s name.
  • To the right of the site, click Remove

To clear all the cookies you can just go to Google Chrome History, and delete the Cache completely. A similar process can be followed in other leading web browsers.

Go to History, and click on Clear Browsing Data as shown below:

Clear Browsing Data

Clear Browsing Data

Error 403

Clear Browsing Data

You can select the time range, select the option of Cookies and other site data, select Cached Images and files, and then click on the “Clear data” button.

Deactivate Chrome Browser Extensions

All the browsers have some extensions installed on them by the user. While troubleshooting the 403 Forbidden error it is recommended to deactivate browser extensions.

Check Firewall Settings

There is a possibility that due to one of your Firewall settings the server is not displaying the requested page. You can momentarily disable the firewall while troubleshooting the 403 Forbidden error issue.

Effects of 403 Forbidden Error on Search Engine Rankings

If your website has started showing a 403 error page which is already ranked, then it is for sure that it will end up losing search engine rankings on prominent websites like Google, Bing, etc. As per the algorithm of search engines, they first downgrade the rankings and then eventually remove the pages from their index which are no more accessible to users or bots.

To avoid such a situation it is recommended that you keep a close watch on your website’s analytics, search console, and webmaster data, and see if there are no such errors.

You can simply log in to Google Search Console (previously known as Google Webmasters), Select your website, and click on Coverage under Index, as shown below:

Google Search Console coverage Error 403

Google Search Console coverage Error 403

It will display the number of errors as well as the type of errors faced by your visitors.

You can just keep an eye on it to keep your website Indexing healthy and avoid getting lower ranks on search engines.

In case if you have recently changed the URL of a page make sure to use a redirection plugin, and redirect the old URL to the new one. Also, update the XML sitemap in the search console.

XML sitemap in the search console

XML sitemap in the search console

We also recommend following the above-described troubleshooting methods under the guidance of a WordPress expert if you are a beginner.

Conclusion

Understanding it, in a nutshell, a 403 forbidden error means the resource or requested file exists on the server but is not accessible to the visitor due to one of the above-specified reasons.

Following the above-described method will most probably solve the issue quickly if you are still not able to troubleshoot using any of the above methods we suggest you contact the tech support of your hosting provider immediately and see what the problem is.

During maintenance or other phases, the server technical team possibly makes configuration changes accidentally. Also, there is a possibility that your IP has been blocked by the server. Ask the technical team to check and unblock your IP Address.

Hope you are enjoying our article. if you find anything missed or would like to add some value to it, please do let us know in the comment section below.


Poor web server performance and lack of proper maintenance can increase the risk of server errors such as 403 Forbidden Error. Host or migrate your website to a more reliable, sturdy, fastest, and reputed server instead. WPOven provides Linode’s powerful private servers with industry-leading features such as:

  • Fastest Private Servers
  • Fully WordPress optimized Servers
  • Upto 100% server uptime guarantee
  • Server stack
  • FREE SSL Certificate
  • FREE Daily malware Scanning & Offsite Backups
  • Hardened Servers with high-end security
  • 24X7 WordPress Expert support
  • Datacentres around the world, etc.

You can have all these features and much more in a single plan with unlimited Free migrations, unlimited staging, and a 14-day risk-free guarantee. Check out our plans or Contact our support team that assists you to choose the right plan.

How do I fix 403 Forbidden error?

Here are some things you can try.
1. Refresh the Page.
2. Double Check the Address.
3. Clear Your Browser Cookies and Cache.
4. Check if You Have Permission to Access the URL.
5. Try Again Later.
6. Contact the Website.
7. Contact your ISP.

What causes a 403 Forbidden error?

The simple reason why we are seeing this error is that you are trying to access something you don’t have permission for. Throwing a 403 forbidden error is your website’s way of stating that you don’t have enough permissions to proceed further. This error is basically due to Incorrect file or folder permissions.

What does 403 Forbidden mean?

401 Unauthorized: If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. 403 Forbidden: The server understood the request, but is refusing to fulfill it.

Are you dealing with the 403 Forbidden error on your WordPress site? It is one of the most dreadful errors that a WordPress beginner can come across. In this article, we will show you how to easily fix the 403 forbidden error in WordPress.

Fixing 403 Forbidden error in WordPress

What is a 403 Forbidden – Access Denied Error in WordPress?

WordPress shows codes and messages when an error occurs on your website. See our list of most common WordPress errors and how to fix them.

403 Forbidden status code shown on a WordPress site

403 Forbidden error code is shown when your server permissions don’t allow access to a specific page.

This is why the error is usually accompanied by the text:

403 Forbidden – You don’t have permission to access ‘/’ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

There are different scenarios when you can see this error. For example:

  • 403 Forbidden – Access denied on wp-admin or WordPress login page.
  • 403 Forbidden – during WordPress install.
  • 403 Forbidden error when visiting any page on your WordPress site.
  • It is also possible that you only get to see ‘Access Denied’ instead of full 403 Forbidden status.
  • You may also see ‘Access to yourdomain.com was denied. You don’t have authorization to view this page.’

Now that you know about the different types of 403 errors, let’s talk about what causes this error.

What Causes 403 Forbidden Error in WordPress?

The most common cause for the 403 Forbidden error in WordPress is due to poorly configured security plugins. Many WordPress security plugins can block an IP address (or a whole range of IP addresses) if they believe them to be malicious.

This is why we use Sucuri to improve security of all our WordPress sites.

Another possible cause could be a corrupt .htaccess file or incorrect file permissions on your server.

Your WordPress hosting company can sometimes make accidental changes to their server settings. This may result in 403 Forbidden error on your site.

Having said that, let’s take a look at how to solve 403 forbidden error in WordPress.

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Fixing 403 Forbidden Error in WordPress

Before you do anything, we recommend that you create a complete WordPress backup of your website. Here is our guide on how to manually create a WordPress backup.

If you were already using an automatic WordPress backup plugin, then make sure that you have access to a latest backup before moving forward.

1. Fixing 403 Forbidden Error Caused by a WordPress Plugin

First thing you need to do is to temporarily deactivate all WordPress plugins. This includes any security plugins that you may have installed on your site.

If this resolves your problem, then this means one of the plugins on your website was causing this error.

You can figure out which plugin was causing the error by activating all your plugins one at a time until you are able to reproduce the 403 forbidden error.

2. Fix 403 Forbidden Error Caused by Corrupt .htaccess File

Often the 403 error is caused by a corrupt .htaccess file in your WordPress site. Repairing this file is quite easy.

First you need to connect to your website using a FTP client or file manager in cPanel.

Next, locate the .htaccess file in the root folder of your WordPress site. See this guide if you can’t find .htaccess file in Your WordPress folder.

You need to download the .htaccess file to your computer so that you have a fresh backup of it. After that, you need to delete the file from your server.

Delete .htaccess file from your WordPress site

Try accessing your website. If 403 forbidden error is resolved, then this means that your .htaccess file was corrupt.

You can generate a fresh .htaccess file by logging into your WordPress admin area and going to Settings » Permalinks page.

Regenerating .htaccess file in WordPress

Simply click on the Save Changes button at the bottom of the page and WordPress will generate a fresh .htaccess file.

3. Fix 403 Forbidden Error Caused by File Permissions in WordPress

All files stored on your website have file permissions. These file permissions control who can access files and folders on your website.

Incorrect file permissions can cause 403 forbidden error. It makes your web server thinks that you do not have permission to access those files.

If the above two solutions do not solve the 403 forbidden error on your site, then incorrect file permissions can be the most likely cause.

You can ask your WordPress hosting provider to check your website for correct file permissions. Some hosts are very supportive, they wouldn’t mind and will probably fix that for you.

Changing file permissions yourself can have serious consequences. If you do not feel confident doing it yourself, then ask a friend for help or hire a professional.

However, if you want to do it yourself, then here is how you would check your file permissions.

Simply connect to your WordPress site using an FTP client. Navigate to the root folder containing all your WordPress files.

Checking file permissions

Click to select a folder, right click and then select File Permissions from the menu.

Your FTP client will show you a file permissions dialog box like this:

Changing file permissions using FTP

All folders on your WordPress site should have a file permission of 744 or 755.

All files on your WordPress site should have a file permission of 644 or 640.

You can set the file permission to the root folder to 744 or 755. Check the box next to ‘Recurse into subdirectories’ and then check the option that says ‘apply to directories only’.

Click on the OK button. Your FTP client will now start setting permissions to all subdirectories in that folder.

Once it is done, you need to repeat the process for all the files. This time you will use file permission of 644 or 640 and don’t forget to select ‘Recurse into subdirectories’ and ‘apply to files only’. options.

Click on the OK button and your FTP client will start setting file permissions for all the selected files.

Try accessing your website now, and 403 forbidden error should be gone now.

We hope this article helped you fix the 403 forbidden error in WordPress. You may also want to see our expert tips and hacks to protect your WordPress admin area.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. We have been creating WordPress tutorials since 2009, and WPBeginner has become the largest free WordPress resource site in the industry.

Ошибка 403 Forbidden, это код состояния HTTP, который появляется, когда у нас нет разрешения на доступ к конкретной странице или ресурса на нашем сайте, скорее всего, из-за какой-то неправильной конфигурации сервера. В большинстве случаев, это может занять больше времени, чтобы на самом деле, чтобы определить и найти то, что именно вызывает эту ошибку в WordPress, чем само исправление ошибки.

В этой статье мы рассмотрим, что означает, что именно ошибка 403 Forbidden, когда он появляется на ваших WordPress сайтах, и как легко исправить ошибку 403 Forbidden, доступ запрещен в WordPress.

Что вызывает ошибку 403 Forbidden в WordPress?

Когда ваши права сервера не разрешают доступ к конкретной странице, будет показан код ошибки 403 Forbidden. Когда дело доходит до нашего сайта на WordPress, мы можем сузить появление ошибки 403 Forbidden в нескольких случаях:

  • Ошибка 403 Forbidden при попытке получить доступ к вашей странице входа WordPress (wp-admin)
  • Ошибка 403 Forbidden во время установки WordPress
  • Ошибка 403 Forbidden при попытке получить доступ к странице на вашем сайте.
  • Ошибка 403 Forbidden после перехода на ваш сайт с другого сервера.

1. Полное резервное копирование WordPress

Перед тем, как начать делать что-либо, настоятельно рекомендуется сделать полную резервную копию вашего WordPress сайта.

Чтобы сделать это, сначала нужно войти на свой сервер через SSH.

Затем перейдите к корневой директории WordPress. Например, она может быть расположена по адресу: /var/www/html/wordpress/.

Для того, чтобы сделать полную резервную копию архивированного сайта на WordPress, вы можете выполнить следующую команду:

tar -cpzf wp-backup.tar.gz /var/www/html/wordpress/

Кроме того, вы также должны сделать резервную копию базы данных. В базе данных хранятся вся информация о вашем сайте, как посты, страницы, комментарии, учетные записи пользователей, конфигурации плагинов и т.д.

Для того, чтобы сделать полную резервную копию базы данных, вы можете использовать следующую команду, а затем указать свой пароль базы данных:

mysqldump -u db_user -p db_name > wp_db_backup.sql

Убедитесь в том, чтобы изменить wp-user и wp-database в соответствии с фактическим пользователем базы данных и имя базы данных.

Если вы не уверены в информации  в вашей базе данных, которая в данный момент подключена к вашему WordPress сайту, вы можете проверить файл wp-config.php внутри WordPress корневого каталога и найти там следующие строки:

define('DB_NAME', 'db_name');
define('DB_USER', 'db_user'); 
define('DB_PASSWORD', 'db_password')

Теперь у нас есть полная резервная копия нашего WordPress сайта, и мы можем двигаться дальше, чтобы исправить ошибку 403 Forbidden в WordPress.

2. Ошибка 403 Forbidden в WordPress вызвана плагинами

Ошибка 403 Forbidden в WordPress вызвана плагинами

Одна из причин этой ошибки может быть неисправен модуль. Самый простой способ определить, вызвана ошибка 403 Запретный плагином, чтобы временно отключить все плагины, которые Вы имеете на вашем WordPress сайте.

Если ошибка исчезнет после того, как мы отключим все плагины, то мы можем подтвердить, что это действительно плагин вызывает эту ошибку. Затем мы можем начать обратный запуск плагинов поочередно, по одному за раз, и продолжайте проверять при повторном появлении ошибки, там мы можем определить точный плагин, который вызывает ошибку 403 Forbidden.

3. Ошибка 403 Forbidden, связана с правами доступа к файлам в WordPress

Ошибка 403 Forbidden, связана с правами доступа к файлам в WordPress

Ошибка 403 Forbidden может также возникать из-за неправильных прав доступа к файлам или неправильному владению вашими файлами и каталогами. Для того, чтобы изменить владельца к данному пользователю/группе каталога WordPress, используйте следующую команду:

chown www-data:www-data -R /var/www/html/wordpress/

Заменить «www-data» на фактического пользователя веб-сервера, а «/var/www/html/wordpress» на фактический путь установки WordPress.

Вы должны также проверить разрешающие правила для всех файлов и каталогов.

Все каталоги должны иметь свои права установлены на 744 или 755.

И все файлы должны иметь разрешения установленные на 640 или 644.

Если какой-либо файл или каталог имеет неправильные разрешения, вы можете вручную изменить их. Например, если мы хотим изменить права доступа к директории wp-content на 755, можно использовать следующую команду:

chmod 755 wp-content

Будьте очень осторожны при работе с правами доступа к файлам на сервере, потому что вы можете легко сломать что-то, если вы не достаточно внимательны. Если вы не уверены в том, что вы делаете, то лучше всего обратиться к хостинг-провайдеру, чтобы помочь вам в этом вопросе.

4. Исправление ошибки 403 Forbidden, вызванное неисправным файлом .htaccess

Что такое: синтаксис .htaccess

Другой возможной причиной того, что может привести к этой ошибке является поврежденный файл .htaccess.

Файл .htaccess находится в вашем корневом каталоге. Перейдите в этот каталог с помощью следующей команды (в качестве альтернативы, вы можете использовать некоторые FTP-клиенты, такие как FileZilla):

cd /var/www/html/wordpress/

После того, как мы разместили файл .htaccess, можно временно сохранить его под другим именем, так что мы можем проверить, действительно этот файл вызывает проблему или нет. Чтобы переименовать файл, используйте следующую команду:

mv .htaccess .htaccess.backup

Теперь мы должны попытаться загрузить наш веб-сайт и проверьте, исчезла ошибка. Если ошибка все еще существует, то проблема не с файлом .htaccess, и мы можем спокойно изменить его обратно на исходное имя:

mv .htaccess.backup .htaccess

Если при удалении файла .htaccess исчезает ошибка 403 Forbidden, это означает, что файл .htaccess поврежден. Тогда мы можем создать новый базовый файл .htaccess, содержащий следующую информацию:

# 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

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

403 forbidden error

Was your online experience interrupted by an annoying 403 error? Don’t worry! You’ve landed on the right page, as this blog unravels everything about the 403 errors on WordPress sites.

A 403 forbidden error looks critical enough to cause panic. However, WordPress errors aren’t as scary as they might appear.

But, before I move ahead with the fixes, let’s learn a bit about this error and its causes, so you can understand the underlying causes and fix those ahead of time. Short on time? Jump right ahead to the fixes.

  • What is 403 Forbidden Error?
  • What Causes the 403 Forbidden Error?
  • What Are the Different Versions of 403 Forbidden Errors?
  • How to Fix the 403 Forbidden WordPress Error (Easy Fixes)
    • Clear Your Browsing Cache
    • Rollback to a Running Version From Your Hosting Backup
    • Check .htaccess File
    • Check File Permissions
    • Deactivate All Plugins
    • HotLink Protection
    • Contact Your Hosting Support
  • Summary

What is 403 Forbidden Error?

This HTTP status code appears when you try to access a forbidden resource. This error code indicates a permission error and is commonly caused due to indexing issues, badly coded plugins, an empty site directory, or ownership issues.

What Causes the 403 Forbidden Error?

A major reason why the 403 error appears on WordPress sites is the improper configuration that denies access to the requested resource.

Other reasons include:

  • A corrupt .htaccess file.
  • A poorly coded plugin.
  • Incorrect file permissions.

What Are the Different Versions of 403 Forbidden Errors?

You may encounter 403 forbidden errors in different versions; some of these are:

  • 403 Forbidden
  • HTTP Error 403 – Forbidden
  • Forbidden: You don’t have permission to access [directory] on this server
  • 403 forbidden error was encountered while trying to use an ErrorDocument to handle the request.
  • Forbidden
  • Error 403

Managed WordPress Hosting Starting From $10/Month

Forget all the hosting hassles with a reliable cloud hosting platform. Robust security + Performance boost.

How to Fix the 403 Forbidden WordPress Error (Easy Fixes)

The 403 error can be a bit tricky to resolve because the server doesn’t allow your browser to load the scripts. That said, there are several ways to resolve the 403 forbidden error on WordPress sites.

The below section shares the easy fixes, and I recommend following the fixes chronologically to detect and fix the error sooner.

Note: Before trying any troubleshooting method, it is highly recommended to back up your entire website. Because if something goes wrong while troubleshooting, it will help you recover your website without any hassle.

1. Clear Your Browsing Cache

Clearing your browser’s cache is the simplest solution to the 403 error, and a hard refresh is always recommended whenever you encounter a WordPress error.

The 403 error might simply be down to the browser cache. So, clearing your browser cache and cookies or visiting your website in incognito mode might fix your issue.

2.  Rollback to a Running Version From Your Hosting Backup

If your hosting provider offers an application or server-level backup, you can revert the changes and roll back to the previous running version. Reverting to the last working version can help you bypass the 403 error.

For example, your website worked fine on  August 31 but stopped on September 1. In that case, you can go back to the previous working version with a few clicks.

If you are a Cloudways user, rolling back to a previous version is incredibly simple. Follow the steps below:

  • Log in to the Cloudways platform
  • Select your application
  • Go to Application Management > Backup and Restore

backup and restore

  • Roll back to the previous version by selecting the date from the drop-down menu

select the date

  • And that’s it. Following the steps above will help you roll back to previous versions on the Cloudways platforms in minutes.

3. Check .htaccess File

Another reason why a 403 forbidden WordPress error may occur is a corrupted .htaccess file. You can fix a bad .htaccess file in a few seconds with any FTP manager.

  • First, log in to your server using an FTP client.
  • Go to the .htaccess file located in the public_html

go to .htaccess file

  • Right-click on the .htaccess file and download the file to remain safe.

download

  • Once you’ve downloaded the file, delete the .htaccess file.

delete

  • Now go to your browser and refresh your website to check if the 403 error has been resolved.

Note: Don’t forget to upload the .htaccess file you previously downloaded to your server.

Sure Your Hosting Provider Isn’t Charging Extra?

Use the Web Hosting Savings Calculator for FREE to instantly find out the ideal host that fits your requirements best.

If the issue is resolved by deleting the .htaccess file, it confirms that the error was due to a corrupted .htaccess file.

To generate a clean .htaccess file, follow these steps:

  • Log in to your WordPress dashboard
  • Go to Settings > Permalinks

permalinks

  • You’ll be redirected to the permalink settings page

permalink settings

  • Click the Save Changes button at the bottom of the page to generate a new .htaccess file.

save changes

  • Open your FTP client to verify if the .htaccess file has been regenerated.

verify .htaccess file

If the error still persists, move to the next troubleshooting method outlined below:

4. Check File Permissions

Many files in WordPress require access permissions. And if those permissions are incorrect, the server will give a 403 permission denied error, indicating you don’t have the requested file.

  • Connect to your WordPress website using an FTP client.
  • Navigate to the root
  • Right-click public_html and click the file permissions

file permissions

  • Ensure that the numeric value in the Permission box is set to 744 or 775
  • Check the box next to ‘Recurse into subdirectories
  • Check the option that says ‘Apply to directories only
  • Click OK

775

  • Repeat the same process for all the files
  • Set the file permission to 644 or 640
  • Don’t forget to select Recurse into subdirectories > Apply to files only
  • Click OK

644

  • Check again to see if the 403 forbidden WordPress error is resolved. If it still appears, then perform the next step, i.e., deactivating the plugins.

5. Deactivate All Plugins

Sometimes poorly coded plugins can cause a 403 forbidden error on WordPress sites. Therefore, we can deactivate all our plugins and check whether the issue is resolved or not.

To deactivate your plugins:

  • You must again access your WordPress files using an FTP client like FileZilla.
  • Go to public_html > wp-content
  • Change the plugins folder name (I’ve changed it to plugins-old)

plugins-old

  • Go back to your browser and refresh.
  • If the website starts working fine, then the plugins were causing the error.
  • Change your plugins-old folder name to plugins.

plugins

  • Once you’ve changed the folder name, go to the WordPress Dashboard > Plugins > Installed Plugins.

Installed Plugins

  • You will see that all plugins are deactivated by default.
  • Activate each plugin and check if your website works after activation, and you’ll find the problematic plugin.

6. HotLink Protection

Hotlink protection prevents other websites from using your site images. You can use hotlink protection if you don’t want to allow Google Images, Pinterest, or any other site to display your images. Also, it helps you with site bandwidth and server resource consumption.

Sometimes, enabling hotlink protection on your CDN/hosting can trigger a 403 error if it is not set up properly. Therefore, it’s highly recommended to carefully configure it and then check the site’s status.

7. Contact Your Hosting Support

If you have performed all the above steps and are still seeing the 403 error, the last resort is to contact your hosting provider. Many managed hosting providers offer prompt help with these issues.

Cloudways has 24/7 live chat & ticket support assistance and offers cloud-based WordPress hosting starting from $10/month. So, with a host like Cloudways, you’re in good hands, even in the world of scary errors like 403.

Note: you can also check our guides to fix other errors such as the 404 error, 500 internal server error, and the white screen of death.

Summary

I hope you found this guide helpful and were able to solve the “WordPress 403 error” via the shared fixes.

Have you figured out any other ways to get rid of this problem? Please share your solutions with us in the comments below for people facing similar issues.

Frequently Asked Questions

Q. Why am I getting 403 Forbidden on a website?

You may get a 403 forbidden error when you try to access a website or a resource that has been marked forbidden.

Q. Is the 403 error the same as the access denied error in WordPress?

Yes, the access denied error is another name for the 403 error.

Q. What is the main difference between 401 and 403 errors?

A 401 error occurs when someone provides no credentials or invalid credentials. In contrast, a WordPress 403 permission denied error appears when the client has correct credentials but is denied permission to perform a particular action on a resource.

Q. How can I prevent the 403 error from occurring?

You can prevent the 403 error by following the steps below:

    1. Cross-checking the .htaccess file
    2. Evaluating the plugin before installing it because a poorly coded plugin can also cause this error
    3. Checking the file permissions

Share your opinion in the comment section.
COMMENT NOW

Share This Article

Customer Review at

“Beautifully optimized hosting for WordPress and Magento”

Arda Burak [Agency Owner]

Farhan Ayub

Farhan is a community manager at Cloudways. He loves to work with WordPress and has a passion for web development. Mostly, he spends his time interacting with the people in the WordPress community. Apart from his work life, Farhan spends his time gaming and playing sports. Feel free to contact him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

Did you just try to access your WordPress site only to be hit by some message telling you something is “Forbidden” or that you don’t have permission to access something on your site? If so, you’ve likely run into the 403 Forbidden error on WordPress.

Seeing an error on your WordPress site can be frustrating and deflating, which is why we’ve created this detailed guide to help you fix the 403 Forbidden Error on WordPress and get your site functioning again as quickly as possible.

Let’s get started without any further introduction because we’re sure you just want to fix your site!

Prefer the video version?

What is the 403 Forbidden Error?

The Internet Engineering Task Force (IETF) defines the error 403 Forbidden as:

The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it. A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any).

Error Code 403
Error Type Authentication error
Error Variations Forbidden – You don’t have permission to access / on this server

403 – Forbidden: Access is denied

Error 403 – Forbidden

403 – Forbidden Error – You are not allowed to access this address

403 Forbidden – nginx

HTTP Error 403 – Forbidden – You do not have permission to access the document or program you requested

403 Forbidden – Access to this resource on the server is denied

403. That’s an error. Your client does not have permission to get URL / from this server

You are not authorized to view this page

It appears you don’t have permission to access this page

Error Causes Corrupt .htaccess file

Incorrect file permissions

Plugin issues

Like many other common WordPress errors, the 403 Forbidden error is an HTTP status code that a web server uses to communicate with your web browser.

403 forbidden error in Chrome

403 forbidden error in Chrome

Quick background on HTTP status codes – whenever you connect to a website with your browser, the web server responds with something called an HTTP header. Usually, this all happens behind the scenes because everything is working normally (that’s a 200 status code, in case you were wondering).

However, if something goes wrong, the server will respond back with a different numbered HTTP status code. While these numbers are frustrating to encounter, they’re actually quite important because they help you diagnose exactly what’s going wrong on your site.

The 403 Forbidden error means that your web server understands the request that the client (i.e. your browser) is making, but the server will not fulfill it.

In more human-friendly terms, it basically means that your server knows exactly what you want to do, it just won’t let you do it because you don’t have the proper permissions for some reason. It’s kind of like you’re trying to get into a private event, but your name got accidentally removed from the guestlist for some reason.

Other HTTP status codes mean different things. We’ve written guides on fixing issues with 404 not found errors, 500 internal server errors, 502 bad gateway errors, and 504 gateway timeout errors.

What Causes the 403 Forbidden Error on WordPress?

The two most likely causes of the 403 Forbidden Error on WordPress are:

  1. Corrupt .htaccess file
  2. Incorrect file permissions

It’s also possible that you’re seeing the error because of an issue with a plugin that you’re using at your site. In this article, we’ll show you how to troubleshoot all of these potential issues.

403 Forbidden Error Variations

Like many other HTTP status codes, there are a lot of different variations for how this error code presents itself.

Here are some common variations that you might come across:

  • “Forbidden – You don’t have permission to access / on this server”
  • “403 – Forbidden: Access is denied”
  • “Error 403 – Forbidden”
  • “403 – Forbidden Error – You are not allowed to access this address”
  • “403 Forbidden – nginx”
  • “HTTP Error 403 – Forbidden – You do not have permission to access the document or program you requested”
  • “403 Forbidden – Access to this resource on the server is denied”
  • “403. That’s an error. Your client does not have permission to get URL / from this server”
  • “You are not authorized to view this page”
  • “It appears you don’t have permission to access this page.”

If you’re on an Nginx server, it will look like this below. Basically, if you see any mention of “forbidden” or “not allowed to access”, you’re probably dealing with a 403 Forbidden error.

What the 403 Forbidden Error looks like at Kinsta

What the 403 Forbidden Error looks like at Kinsta

How to Fix 403 Forbidden Error on WordPress

To help you fix the 403 Forbidden Error on your WordPress site, we’ll cover five separate troubleshooting steps in detail:

  • File permissions
  • .htaccess file
  • Plugin issues
  • CDN issues
  • Hotlink protection

1. Modify Your File Permissions

Each folder and file on your WordPress site’s server has its own unique file permissions that control who can:

  • Read – see the data in the file/view the contents of a folder.
  • Write – modify the file/add or delete files inside a folder
  • Execute – run the file and/or execute it as a script/access a folder and perform functions and commands.

These permissions are indicated by a 3-digit number, with each digit indicating the level of permission for each of the 3 categories above.

Normally, these permissions just “work” for your WordPress site. However, if something gets messed up with the file permissions at your WordPress site, it can cause the 403 Forbidden error.

To view and modify your site’s file permissions, you’ll need to connect via FTP/SFTP. Here’s how to use SFTP if you’re hosting at Kinsta.

For the screenshots in the tutorial below, we’ll be using the free FileZilla FTP program. The basic principles will apply to any FTP program, though – you’ll just need to apply them to a different interface.

Once you’re connected to your server, you can view a file or folder’s permissions by right-clicking on it:

View file permissions in FileZilla

View file permissions in FileZilla

Of course, manually checking the permissions for each file or folder isn’t really an option. Instead, you can automatically apply file permissions to all the files or folders inside of a folder.

According to the WordPress Codex, the ideal file permissions for WordPress are:

  • Files  – 644 or 640
  • Directories – 755 or 750

One exception is that your wp-config.php file should be 440 or 400.

To set these permissions, right-click on the folder that contains your WordPress site (the folder name is public at Kinsta). Then, choose File Attributes:

Bulk edit file permissions in FileZilla

Bulk edit file permissions in FileZilla

Enter 755 or 750 in the Numeric value box. Then, choose Recurse into subdirectories and Apply to directories only:

File permissions for WordPress directories

File permissions for WordPress directories

Once you’ve applied the correct permissions for directories, you’ll repeat the process for files. Only this time:

  • Enter 644 or 640 in the Numeric value box
  • Choose Recurse into subdirectories
  • Choose Apply to files only

File permissions for WordPress files

File permissions for WordPress files

To finish the process, you just need to manually adjust the permissions for your wp-config.php file to make them 440 or 400:

File permissions for wp-config.php file

File permissions for wp-config.php file

If file permissions issues were causing the 403 Forbidden Error, your site should now start working again.

2. Delete and Restore the .htaccess File

Kinsta uses the NGINX web server, so this potential issue doesn’t apply if you’re hosting your site at Kinsta because Kinsta sites do not have a .htaccess file.

However, if you’re hosting elsewhere and your host uses the Apache web server, one common cause of the 403 Forbidden error is a problem in your site’s .htaccess file.

The .htaccess file is a basic configuration file used by the Apache web server. You can use it to set up redirects, restrict access to all or some of your site, etc.

Because it’s so powerful, even if a little mistake can cause a big issue, like the 403 Forbidden error.

Rather than trying to troubleshoot the .htaccess file itself, a simpler solution is to just force WordPress to generate a new, clean .htaccess file.

To do that:

  • Connect to your server via FTP
  • Find the .htaccess file in your root folder
  • Download a copy of the file to your computer (it’s always a good idea to have a backup just in case)
  • Delete the .htaccess file from your server after you have a safe backup copy on your local computer

Delete the .htaccess file

Delete the .htaccess file

Now, you should be able to access your WordPress site if your .htaccess file was the issue.

To force WordPress to generate a new, clean .htaccess file:

  • Go to Settings → Permalinks in your WordPress dashboard
  • Click Save Changes at the bottom of the page (you do not need to make any changes – just click the button)

How to generate a new, clean .htaccess file

How to generate a new, clean .htaccess file

And that’s it – WordPress will now generate a new .htaccess file for you.

3. Deactivate and then Reactivate Your Plugins

If neither your site’s file permissions nor .htaccess file are the problems, the next place to look is your plugins. It could be a bug in a plugin or a compatibility issue between different plugins.

No matter what the issue is, the easiest way to find the problematic plugin is with a little trial and error. Specifically, you’ll need to deactivate all of your plugins and then reactivate them one by one until you find the culprit.

If you can still access your WordPress dashboard, you can perform this process from the normal Plugins area.

If you cannot access your WordPress dashboard, you’ll instead need to connect to your WordPress site’s server via FTP/SFTP (here’s how to connect via SFTP at Kinsta).

Once you’re connected to your server via FTP:

  1. Browse to the wp-content folder
  2. Find the plugins folder inside of the wp-content folder
  3. Right-click on the plugins folder and choose Rename
  4. Change the name of the folder. You can name it anything different, but we recommend something like plugins-disabled to make it easy to remember.

Rename the plugins folder

Rename the plugins folder

By renaming the folder, you’ve effectively disabled all the plugins at your site.

Now, try accessing your site again. If your site is working, you know that one of your plugins is causing the 403 Forbidden error.

To find the culprit, reactivate your plugins one-by-one until you find which plugin is causing the issue.

After changing the file name of the plugins folder, you should see a number of errors that say plugin file does not exist when you go to the Plugins area on your site:

What happens after renaming the plugins folder

What happens after renaming the plugins folder

To fix this issue and regain the ability to manage your plugins, use your FTP program to change the name of the folder back to plugins. So, if you renamed it to plugins-disabled, just change it back to plugins.

Once you do that, you’ll see the full list of all your plugins again. Only now, they’ll all be deactivated:

Reactivate your plugins one by one

Reactivate your plugins one by one

Use the Activate button to reactivate them one-by-one.

Once you find the plugin that’s causing the issue, you can either reach out to the plugin’s developer for help or choose an alternate plugin that accomplishes the same thing (we’ve collected the best WordPress plugins here).

4. Deactivate CDN Temporarily

If you’re getting 403 forbidden errors on your assets (images, JavaScript, CSS), it could be a problem with your content delivery network (CDN). In this case, we recommend temporarily disabling your CDN and then checking your site to see if it works. If you’re a Kinsta client, click into your site and then on the “Kinsta CDN” tab. Once there, toggle the “Kinsta CDN” button off.

Disable Kinsta's CDN

Disable Kinsta’s CDN

5. Check to See If Hotlink Protection Is Misconfigured

Hotlinking is when someone adds an image to their site, but the hosted link is still pointed to someone else’s site. To prevent this, some will set up what is called “hotlink protection” with their WordPress host or CDN provider.

When hotlink protection is enabled, it will typically return a 403 forbidden error. This is normal. However, if you’re seeing a 403 forbidden error on something you shouldn’t be, check to make sure hotlink protection is configured properly.

Still Having Issues? Reach Out to Your Hosting Provider

If none of the above solutions worked for you, then we recommend reaching out to your hosting provider. They can most likely help you pinpoint the issue and get you back up and running. If you’re a Kinsta client, open up a support ticket with our team. We are available 24/7.

Summary

The 403 Forbidden error means that your server is working, but you no longer have permission to view all or some of your site for some reason.

The two most likely causes of this error are issues with your WordPress site’s file permissions or .htaccess file. Beyond that, some plugin issues might also cause the 403 Forbidden error. Or it could be that something is misconfigured with hotlink protection or your CDN.

By following the troubleshooting steps in this guide, you should be able to get your site back to working in no time.


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275+ PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

  • Установка windows ошибка 8007025d
  • Установка директ х на виндовс 7 произошла внутренняя системная ошибка
  • Установка windows компьютер неожиданно перезагрузился или возникла непредвиденная ошибка windows 10
  • Установка директ икс произошла внутренняя системная ошибка
  • Установка windows 7 ошибка 0x80300024 при установке windows 7