Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressのファイルとフォルダーの権限エラーを修正する方法

WordPressのファイルとフォルダーの権限エラーを修正したいですか?

ファイルやフォルダーの権限が正しくないと、WordPressサイトのアップロード時にエラーが発生することがあります。これらのエラーはWordPressによる画像のアップロードを停止させ、スクリプトを妨害し、サイトのセキュリティを低下させます。

この投稿では、WordPressのファイルとフォルダーの権限エラーを簡単に修正する方法を紹介します。

Fix file and folder permissions in WordPress

WordPressのファイルとフォルダーの権限はどのように機能しますか?

WordPressのファイルとフォルダーの権限は、サイトのファイルを読んだり、実行したり、変更したりできる人をコントロールします。WordPressのウェブホスティングサービスはApacheのような特別なソフトウェアを使用して、これらのファイルを管理し、ブラウザーに表示します。

これらの権限は、WordPressがサーバー上でファイルを扱い、フォルダーを作成し、タスクを実行するために重要です。

権限が正しく設定されていないと、WordPressがフォルダーを作成したり、画像をアップロードしたり、スクリプトを実行したりすることができなくなります。不正な権限はWordPressサイトのセキュリティも脅かします

権限が間違っている場合、WordPressは通常、ファイルの編集やフォルダーの作成ができないなどの問題について警告を発します。しかし、特定のエラーメッセージが表示されないこともあります。

WordPressの正しいファイルとフォルダーの権限とは?

正しいファイルとフォルダーの権限設定により、WordPressはフォルダーとファイルを作成することができます。ほとんどのユーザーには以下の設定を推奨します:

  • すべてのフォルダーとサブフォルダーに対して755。これにより、サイトオーナーはフォルダーの読み取り、書き込み、実行が可能になります。
  • 644をすべて使用する。これにより、サイトオーナーはファイルの読み書きができ、他のユーザーはファイルの読み込みのみが可能になります。

ということで、WordPressのファイルとフォルダーの権限を簡単に修正する方法を見ていきましょう。2つの方法がありますので、以下のクイックリンクからお好きな方法に飛んでください:

方法1:プラグインでWordPressのファイルとフォルダーの権限を修正する

WordPressのファイルとフォルダーの権限エラーを修正するには、通常FTPクライアントを使用します。このエラーを手動で解決する自信がある場合は、2番目の方法に進んでください。

そうでない場合は、All-in-One Securityプラグインでこのプラグインのメソッドを使用することができます.このプラグインは、数回のクリックで推奨ファイルとフォルダーの権限を設定する機能を持っています.

このチュートリアルでは無料版のプラグインを使用しますが、より高度な機能を使用するには有料版をご自由にお使いください。詳しくはAll-in-One Securityのレビューをお読みください。

まず、WordPressにAll-in-One Securityプラグインをインストールします。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

完了したら、WP Security “ File Securityにアクセスしてください。そして、「ファイル権限」タブにナビゲーションしてください。

All in One Security's File Security feature

ここで、プラグインはWordPressの重要なコアフォルダとファイルをスキャンし、安全でない権限設定を強調表示します。

プラグインが権限エラーのあるフォルダーやファイルを1つでも見つけると、「推奨アクション」欄に「推奨権限を設定する」というボタンが表示されます。

修正するには、それをクリックするだけで、プラグインがファイルやフォルダーの権限を変更します。

Setting the recommended file and folder permissions in All in One Security

そうすると、「推奨されるアクション」の欄が「アクションは必須ではありません」に変わるはずです。

方法2:WordPressのファイルとフォルダーの権限を手動で修正する

まず、FileZillaのようなFTPクライアントまたはcPanelのファイルマネージャーアプリを使ってWordPressサイトに接続する必要があります。接続したら、WordPressサイトのルートフォルダーに移動します。

その後、ルートディレクトリ内のすべてのフォルダーを選択し、右クリックして「ファイル権限」を選択する必要があります。

File permissions in FTP

これにより、ファイル権限ダイアログボックスがポップアップ表示されます。

ここで、数値フィールドに「755」を入力する必要がある。その後、’Recurse into subdirectories’ チェックボックスをクリックし、’Apply to directories only’ オプションを選択する。

Fixing folder permissions in WordPress

OK’ボタンをクリックして続行します。FTPクライアントがフォルダーとサブフォルダーの権限設定を開始します。完了するまで待つ必要があります。

次に、WordPressサイトのルートフォルダー内のファイルとフォルダーをすべて選択し、右クリックして「ファイル権限」を選択する必要があります。

Setting permissions for all files

ファイル権限ダイアログボックスが外観表示されます。

今回は、「数値」ボックスに「644」を入力する必要がある。その後、’Recurse into subdirectories’ チェックボックスをクリックし、’Apply to files only’ オプションを選択する。

Setting permissions for files in WordPress

OK」をクリックして続ける。

FTPクライアントがWordPressサイト上のすべてのファイルの権限設定を開始します。

この方法でうまくいかない場合は、ホスティングサービスに問い合わせることをお勧めします。プロバイダー側でエラーが発生している可能性があります。WordPressサポートの正しい依頼方法については、こちらのガイドをお読みください。

WordPressのファイルについてさらに詳しく知りたい方は、WordPressのファイルとディレクトリに関する初心者ガイドをご覧ください。

さらに詳しくWordPressのエラーを解決する方法

WordPressサイトのその他のエラーにお困りですか?これらのガイドをチェックして問題を解決し、サイトをスムーズに運営しましょう:

この投稿がWordPressのファイルとフォルダーの権限エラーを修正するのにお役に立てば幸いです。WordPressのよくあるエラーの直し方や、サイトを成長させるWordPressプラグインの トップピックもご覧ください。

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. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

69件のコメントLeave a Reply

  1. I searched around for other articles and I found this other article which mentioned something about using chmod, it qoutes the following “If you are looking to change the permission for the wp-config.php file, you can use the following command for the suggested change as cited earlier –
    chmod 600 wp-config.php”, so I would like to know if this is advisable and where can I find the command line?

    • That is mainly a different way to do what we cover in the article and is not always a beginner friendly method.

      Admin

  2. I have a problem with my file manager there’s a folder which isnt either 644 nor 755, it is 600 and whenever I try to change it, I get an error alert saying that permission operation failed, how can i solve that?

    • You would want to reach out to your hosting provider and they should be able to assist you with the permissions issue.

      Admin

  3. Hi, great article. Just to confirm, I understand step 1 ” you must select all folders in the root directory” and then its the next step that I’m no sure about: “Next, you need to select all files and folders in the root folder of your WordPress site…” So that would be the folder: “Public_Html? Because that’s where the folders I see in your screenshot reside. And your not selecting all the folders again under the root directory as in step 1 right?

    Thanks and best regards

    • It depends on your host but in the folders selected you would want to see wp-admin, wp-content, and wp-includes to make sure you are in the correct location.

      Admin

  4. This actually worked with the step one (Permissions and 777). For some reason i wasn’t able to delete two folders from the “Upload”-Folder and then it worked. For some reason i had to re-start Filezilla because it was getting frozen but it worked out. Thanks.

  5. Is there a reason why it is recommended to use an FTP client to manage user permission instead of managing them in the C-panel?

  6. I was struggling for many hours and could not understand what had happend. I found this guide and followed every step. Now both my main domain and subdomain are working again. Thank you VERY much.

  7. Could you tell me what FTP program your using, so the instructions are easier to follow. as most programs don’t use the same terminology it seems.

    • If you are still receiving the error, you would want to reach out to your hosting provider and they should be able to assist.

      Admin

  8. I’ve been searching like crazy and still can’t find my answer. Any idea what’s going on? When I follow the directions to right click and look for “File Permissions”, I don’t have that option. So I’m stuck and still can’t upload images anymore :(
    Any advice would be much appreciated.

    • If you can’t see the folder permissions, we would recommend reaching out to your hosting provider and they should be able to assist.

      Admin

  9. Hello, I followed this article, but I can’t connect to my website after changing all permissions.

    Do I have to wait?
    Or something wrong happened?

    it would be great if anyone who know about this help me.

    • It would depend on if you are seeing an error message on your site, for a starting point we would recommend reaching out to your hosting provider to see if they find any errors.

      Admin

  10. Does anyone have any idea why, every time wordpress automatically updates, I have to go back in and reset file permissions? This page is really useful for fixing this issue, but I just want it to stop!

    • You may want to reach out to your hosting provider to ensure there isn’t a setting that could be causing that from their end.

      Admin

  11. How do you handle the request for FTP credentials when you’re learning WordPress on a local host? I read this article but the sharing and permissions menu on a mac does not show a numeric value field.

    • It would depend on the specific issue you’re running into but rather than needing FTP for a local installation, you would want to navigate to where the files are on your computer.

      Admin

  12. For files you state to give permissions 644 for owner,group,others. Why do you give file read permissions (4) to others. Is there some reason others require file read permissions, why are all files not set to 640 ?

  13. Thanks for the tutorial. I could fix this problem for files already on the website, but everytime new files are uploaded they have the same problem again!

    • If this issue is constant, we would recommend reaching out to your hosting provider to take a look at possible causes.

      Admin

  14. having this issue on a locally hosted site that I’m using for test purposes only. So I don’t have FTP access to the files and changing their permissions from Windows Explorer is not working. Any other ideas?
    The main WP directory and the Themes directory are both unwritable according to the WP System Tools.

    • You would want to check with the localhost tool you are using for your site as which one you are using would determine the options you have available and the possible issues.

      Admin

  15. i accidentally changed the permission on my update file to xxx and now when i try to change it back to 755 it won’t save. Any help?

    • If you’re unable to update the file permissions, you would want to reach out to your hosting provider they should be able to assist :)

      Admin

  16. I’ve made your solution with the permissions 755 and 644, the website works a few seconds and than it breaks agin. And i have to do the permissions again. can you help me?

    • If the permissions are reverting then you would want to reach out to your hosting provider to ensure that there isn’t a setting on their end that would modify the permissions as well.

      Admin

    • If the method in this article does not remove that error, you would want to reach out to your hosting provider.

      Admin

  17. Hi, I should change file permission:
    / 755 750 WARNING

    Can somebody tell me, where to find this “/” in C panel? To be honest, I don’t know, what this sign / means. Thank you, have a great day! Suzana

    • If you’re using the file manager on your host’s cpanel then your site’s files are normally under public_html as that is where most FTPs connect to your host.

      Admin

  18. Thanks for this article! I thought I had completely fudged my site. None of my uploaded media or even CSS styling (I have no idea why that was effected) was displaying properly.

    I had tweaked my permissions earlier but must have done it incorrectly. Your fix was the solution to my problem!

    Many thanks

  19. Thank you for this insightful article – I will keep it as a ressource for cases of curiousity (and panic, of course :D).
    What I am struggling with are “wp GET”-lookups with result 404 when playing around with cacheing.
    My wordpress installation is in a subfolder named wp, not in the root folder.
    Which rights would I have to give this specific folder?

    Thanks in advance for any help.

  20. Hi there, Im having issues in links of FTP and WordPress..first i make a basic html and upload thrugh FTP after sometime i convert that website in using wordpress..now the issue is that the links of those html files and folders which i uploaded in FTP is now not working.just new links are working.The Error is ” No Page Found”
    is there any tool, plugin or way to make alive those FTP Html links??please help me in this issue

  21. my system can not read WordPress properly. the files are not displaying very well. it just showing white icons of the files like a white sheet paper.

  22. Hi

    I have wordpress installed on a local server and I’m getting ‘no data could be retrieved from the servers’ when I try to access the slider revolution library.

    Is this because of the file permissions error described here? I’ve set all of the user permissions to ‘full control’ in my index.php file to no avail. I don’t seem to have the option to change to the numeric permissions you describe above. Really stuck on this one so any help would be appreciated.

    thanks & regards
    Odhran

  23. I changed 755 to all folder and 644 to all file. But still cannot upload images to Media and cannot install new plugins.

    PS: I upload whole wp-content folder from another hosting to my new hosting and extract it.

    Please give me some advices.

    Thank you.

    • This is because you can’t just copy item from a server to another without tweaking the Database. The database must know that the ones you just copied ‘exist’

  24. Useful but since I’m such a newbie and still learning WordPress, I am stuck. I can’t even seem to log in because of the 500 internal server error. Do you know what I should do?

  25. I’ve a problem after i changed permissions to be like above, this error appears :
    “Application error
    An error occurred in the website and your page could not be displayed. If you are the website owner, check your logs for details”

  26. This works for all types of PHP applications sitting on a website server and not only WordPress. My host denied me access to all folders and files including login page and registration page.

    Little did i know that all my files and folders were still to 777 during local development. After changing folders and files recursively to 755 and 644 respectively it worked.

  27. Hi there, Im having issues in that I dont have sufficient permissions to change permissions through the FTP client… unable to create new folders. very frustrating, have spent ages looking for a solution. Running a WP multisite running on Amazon EC2). Thanks.

    • @LB , you have limited access to your FTP account. Please contact Amazon to get you full access. or if you have server access then change permission in filezilla server.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.