Lỗi is its parent directory writable by the server năm 2024

Sửa lỗi “Is its parent directory writable by the server” WordPress – Đây là một lỗi khá phổ biến đối với những ai đang sử dụng mã nguồn WordPress khi bạn thực hiện việc tải tệp lên trang Web của mình. Lỗi “Is its parent directory writable by the server” trong WordPress tương đối khó chịu, bạn không thể thực hiện việc tải File lên trang Web, rất may mắn lỗi này không quá khó để sửa chữa bạn có thể áp dụng theo các phương pháp bên trên để sửa lỗi một cách hiệu quả nhất.

Unable to create directory .../wp-content/uploads. Is its parent directory writable by the server?

Để khắc phục vấn đề này, Bạn hãy sử dụng phần mềm FTP [ ví dụ như cuteFTP, filezila]

Cách 1: Tại thư mục: wp-content [ .../wp-content/] bạn tạo một thư mục con mang tên: uploads [ đường dẫn sẽ là: .../wp-content/uploads ] Chmod thành 777 Cách 2: Bạn có thể Chmod thư mục wp-content [ .../wp-content/] thành 777, đồng thời nếu đã có thư mục uploads [ .../wp-content/uploads] thì cũng chmod thành 777

Lưu ý: Chmod 777 có thể dẫn đến nguy cơ bảo mật, vì thế nên bạn không sử dụng hãy chmod về lại 755

  • 739 Khách hàng đánh giá tốt

Related Articles

Shared Hosting là gì?

Shared Hosting là gói dịch vụ lưu trữ web site chuyên nghiệp có máy chủ đặt tại Việt Nam đường...

Web hosting là gì?

Web hosting là một lọai hình lưu trữ trên Internet cho phép các cá nhân, tổ chức truy cập được...

Một số trường hợp khi bạn thực hiện đăng tải một file, hay ảnh lên WordPress nhưng gặp các lỗi như ảnh bên dưới. Ở bài này TenTen sẽ hướng dẫn bạn xử lý như sau :

‘Unable to create directory wp-content/uploads/2019/04. Is its parent directory writable by the server?’

Phân quyền thư mục

Với mã nguồn WordPress thư mục lưu trữ hình ảnh sẽ nằm trong đường dẫn sau domain/wp-conten/upload khi bạn truy cập vào được đây rồi bạn thực hiện phân quyền thư mục upload thành 0755

Sửa lại đường dẫn lưu trữ

Nếu sau khi set lại vẫn không được bạn kiểm tra lại Lưu trữ trong admin WordPress bằng cách truy cập vào Cài đặt => Thư viện và bạn để ý dòng Lưu các tập tin tải lên trong thư mục . Ở đây có thể set thư mục bị sai và thư mục không tồn tại, nên bạn hãy xoá bỏ và để trống sau đó save lại.

Huong dan cai dat WordPress, Huong dan lap trinh WordPress, Hoc WordPress mien phi, Hoc WordPress online, Hoc WordPress mien phi, SEO WordPress, Plugin WordPress, Theme WordPress, WordPress Tool, WordPress Development, WordPress FAQ

Nếu Bạn thường xuyên sử dụng wordpress thì việc gặp lỗi “Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server in WordPress?” là điều không tránh khỏi.

Unable to Create Directory wp-content/uploads. Is its Parent Directory Writable by the Server in WordPress

Việc fix lỗi này khá đơn giản. Các Bạn hãy làm theo các cách sau nhé

Cách 1: Lý do wordpress không thể up ảnh lên là do phân quyền [Permissions, chmod] Bạn hãy kiểm tra xem các thư mục wp-content, uploads [url chứa anhr0 xem đã phân quyền đúng chưa. Cần set full quyền nhé.

Nếu cách 1 chưa thành công thì sử dụng cách 2 nhé

Cách 2: Thêm 2 dòng này vào file wp-config.php

require_once[ABSPATH . ‘wp-settings.php’]; define[ ‘UPLOADS’, ‘wp-content/uploads’ ];

Nếu vẫn không được thì liên hệ lại mình để mình kiểm tra nhé

This article will teach you how to resolve the “Is its parent directory writable by the server?” error. It’s a common WordPress problem that prevents you from uploading files to your website.

The error can happen due to incorrect permissions, ownerships, or the location of the uploads folder. Regardless of the cause, we’re here to show you how to fix this error quickly.

There are two methods of resolving the issue on shared hosting — by changing the directory path and permissions of the uploads folder.

1. Changing the Uploads Folder Directory

Sometimes, the “Is its parent directory writable by the server?” issue occurs because WordPress can’t recognize the location of the uploads folder.

You might face the problem after you have just moved your site to another hosting provider. To fix it, you need to modify your WordPress config file:

  1. Access your hosting file manager or FTP, and search for the wp-config.php file. It is commonly located in the root folder of your website [/public_html].

  1. Open the file and add the following code:

 define[ 'UPLOADS', 'wp-content/uploads' ];

before this line:

require_once[ABSPATH . 'wp-settings.php'];

  1. Save the file. Now, try to upload your media files again.

2. Changing Folder Permissions

If you still get the “Is its parent directory writable by the server?” error after following Method 1, you might want to try resetting the permissions of your uploads folder.

Simply follow the instructions below:

  1. Connect to your account via an FTP client or file manager. Go to the WordPress installation directory — commonly in /public_html.
  2. Open the wp-content folder and right-click on the uploads folder.
  3. Click on File Permissions. A new dialogue box will pop up. Look for the Numeric Value field and enter 755.
  4. Scroll down and make sure the Recurse into subdirectories box is checked.
  5. Select Apply to directories only and click OK.

By performing this method, you will reset the permissions of the uploads folder and its subfolders to 755.

The number means the owner of the file can read, write, and execute the file. This is important to allow the directory to be writable. Hence, fixing the “Is its parent directory writable by the server?” error.

How to Fix “Is its parent directory writable by the server?” Error on VPS

If your WordPress site is hosted on VPS, you can try the following solution to fix “Is its parent directory writable by the server?” error. However, note that this method only works for Linux running on Apache webserver.

Before we begin, let’s understand some basics. By default, your Apache web server uses the www-data user and www-data group to access files and folders.

However, there is a possibility that the uploads folder is not owned by www-data. This situation leads to the “Is its parent directory writable by the server?” issue.

What you need to do is change the owner of the uploads directory to www-data:

  1. Connect to your VPS via SSH. You can learn how to do so in our SSH tutorial.
  2. Navigate to the wp-content folder inside your WordPress installation directory. cd public_html/wp-content
  3. Change the owner and group of the uploads folder to www-data by executing this command: chown -R www-data:www-data uploads
  4. Just like on shared hosting, the default permissions for the uploads folder might be incorrect. Therefore, while you are inside the wp-content folder, you may run the following command: chmod 755 -R uploads It will set permissions for plugins and all subdirectories inside it to 755.

Note that you can change Linux folder ownerships and permissions via the command line even further.

The solution above might not work if you switched over to a new hosting provider, as configurations between hosting services may vary.

Conclusion

The “Is its parent directory writable by the server?” issue can be frustrating because it won’t allow you to upload files to your WordPress site. Thankfully, in this article, you have learned the various solutions to this error, both on shared hosting and VPS.

The most common method is to change the owners and permissions of the uploads folder. If this option doesn’t work, you may want to modify the uploads directory or the wp-config.php file.

Hopefully, by following this guide, you can quickly fix the issue. Good luck!

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Chủ Đề