Introduction:
If you’re running a WordPress website, you may encounter the “e06 file_folder_exception: failed to complete the process. error code: dirnf” error in WordPress when uploading files or images to your media library. This error can be frustrating, but fortunately, there are several solutions that you can try to fix.
Solve the e06 file_folder_exception: failed to complete process. error code: dirnf – Error in WordPress with easy steps
Method 1: Increase the PHP Memory Limit
To increase the PHP memory limit in WordPress, you can edit the wp-config.php file, located in your WordPress installation’s root directory. Here’s how:
- Connect to your website via FTP or cPanel File Manager.
- Locate the wp-config.php file in the root directory of your WordPress installation.
- Download a backup copy of the file to your local computer, just in case.
- Open the wp-config.php file in a text editor.
Add the following line of code somewhere above the “That’s all, stop editing!” line:
define( 'WP_MEMORY_LIMIT', '256M' );
- Save the file and upload it back to your website, overwriting the existing file if necessary.
Note: If you can access your server’s php.ini file, you can also increase the PHP memory limit there.
One possible reason for the “e06 file_folder_exception: failed to complete the process. error code: dirnf” error is that your PHP memory limit is too low. To fix this, you can try increasing the PHP memory limit by adding the following code to your wp-config.php file:
define( 'WP_MEMORY_LIMIT', '256M' );
If this doesn’t work, you can try increasing the limit to 512M or higher.
Method 2: Disable ModSecurity
ModSecurity is a web application firewall that can sometimes interfere with the file upload process in WordPress. To disable ModSecurity, you can add the following code to your .htaccess file, which is located in the root directory of your WordPress installation:
Another possible reason for the error in WordPress is that ModSecurity, a web application firewall, is blocking the file upload process. To fix this, you can try disabling ModSecurity by adding the following code to your .htaccess file:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off</IfModule>
Here’s how to add the code to your .htaccess file:
- Connect to your website via FTP or cPanel File Manager.
- Locate the .htaccess file in the root directory of your WordPress installation.
- Download a backup copy of the file to your local computer, just in case.
- Open the .htaccess file in a text editor.
- Add the code above somewhere in the file.
- Save the file and upload it back to your website, overwriting the existing file if necessary.
Note: Disabling ModSecurity can make your website less secure, so be sure to re-enable it once you’ve resolved the file upload issue.
Method 3: Check File and Folder Permissions
If there are issues with file and folder permissions on your server, you may encounter the “e06 file_folder_exception: failed to complete the process. error code: dirnf” for WordPress error. To fix this, you can check and change the permissions of your wp-content directory to 755 and the permissions of your uploads directory to 775.
To do this, you can use an FTP client such as FileZilla or your web host’s file manager. Simply navigate to your WordPress installation directory, right-click on the wp-content directory, and select “File Permissions” or “Permissions” from the context menu. In the permissions dialog, set the permissions to 755 and click “OK” or “Apply”. Repeat this process for the uploads directory, setting the permissions to 775.
Conclusion:
The “e06 file_folder_exception: failed to complete process. error code: dirnf” error in WordPress can be caused by a number of different factors, including low PHP memory limit, ModSecurity, and file and folder permissions.
By trying the solutions outlined above, you should be able to resolve the common error in WordPress and get back to uploading files to your media library.
Read also: How to Fix The Critical Error in WordPress?