Title: File Upload Failed for .php files
Last modified: July 28, 2017

---

# File Upload Failed for .php files

 *  [wpfiend](https://wordpress.org/support/users/wpfiend/)
 * (@wpfiend)
 * [9 years ago](https://wordpress.org/support/topic/file-upload-failed-for-php-files/)
 * Hello.
 * Here is a snapshot of the error message I get when I try to upload a .php file:
 * [http://imgur.com/e6kFAPZ](http://imgur.com/e6kFAPZ)
 * All other file types are working as they should.
 * Here are two variants of the shortcode that I tried:
 * `[wordpress_file_upload uploadpath="themes/Avada-Child-Theme/" uploadrole="s2member_level3"]`
 * `[wordpress_file_upload uploadpath="themes/Avada-Child-Theme/" uploadrole="s2member_level3"
   uploadpatterns="*.php"]`
 * Any help will be greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years ago](https://wordpress.org/support/topic/file-upload-failed-for-php-files/#post-9359495)
 * Hi, do you really want to allow php files through the form? This is extremely
   dangerous as a hacker can inject executable files in your website and take control
   through Web Shells.
 * PHP files are blacklisted and not allowed by the plugin. However, if you still
   want to allow them, there is a way to do it. Do you have the Free or Pro version(
   instructions change)?
 * Regards
 * Nickolas
 *  Thread Starter [wpfiend](https://wordpress.org/support/users/wpfiend/)
 * (@wpfiend)
 * [9 years ago](https://wordpress.org/support/topic/file-upload-failed-for-php-files/#post-9359514)
 * Hi Nickolas.
 * Yes, understood about the dangers of php uploads. We just need to use it as a
   test run for one of our off-site developers.
 * We are currently using the Free version.
 * Thanks.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [9 years ago](https://wordpress.org/support/topic/file-upload-failed-for-php-files/#post-9365744)
 * Hi, ok for free version you need to put the following code at the end of functions.
   php file of your theme:
 *     ```
       global $wfu_extension_blacklist;
       if ( isset($wfu_extension_blacklist["php"]) ) unset($wfu_extension_blacklist["php"]);
       ```
   
 * You also need to edit the shortcode using the visual editor and set `*.php` in
   Allowed File Extensions, or `*.*, *.php`
 * Nickolas
 *  Thread Starter [wpfiend](https://wordpress.org/support/users/wpfiend/)
 * (@wpfiend)
 * [9 years ago](https://wordpress.org/support/topic/file-upload-failed-for-php-files/#post-9365751)
 * Thanks Nickolas.
 * Since we were on a time-crunch, we took out .php from the Disallowed section 
   and added it to the Allowed section in /lib/wfu_security.php
 * That seemed to have worked too.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘File Upload Failed for .php files’ is closed to new replies.

 * ![](https://ps.w.org/wp-file-upload/assets/icon-256x256.png?rev=3252590)
 * [Iptanus File Upload](https://wordpress.org/plugins/wp-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-upload/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [wpfiend](https://wordpress.org/support/users/wpfiend/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/file-upload-failed-for-php-files/#post-9365751)
 * Status: not resolved