Title: File edit function doesn&#8217;t work for PHP files anymore
Last modified: August 29, 2018

---

# File edit function doesn’t work for PHP files anymore

 *  Resolved [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * (@finalwebsites)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/file-edit-function-doesnt-work-for-php-files-anymore/)
 * Hi,
 * there is a problem with WP 4.9 and your plugin.
    With 4.9 there is a new check
   for a valid php file after using the dashboards file editor. The strange thing
   is that it still works with css files. It happens to me with multiple themes 
   and always with the firewall plugin enabled. How can you test it? Install your
   plugin with default settings on a website which is using the latest WP version.
   Try the edit file function for your theme’s function.php.

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

 *  Plugin Contributor [bruandet](https://wordpress.org/support/users/bruandet/)
 * (@bruandet)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/file-edit-function-doesnt-work-for-php-files-anymore/#post-10635498)
 * Hi,
 * It’s a known issue, I reported it six months ago to core.trac.wordpress.org: 
   [https://core.trac.wordpress.org/ticket/43358](https://core.trac.wordpress.org/ticket/43358)
   
   But it is still in the “Awaiting Review” state.
 * You can edit `wp-admin/includes/file.php`, search for:
 *     ```
          // Make sure PHP process doesn't die before loopback requests complete.
          @set_time_limit( 300 );
   
          // Time to wait for loopback requests to finish.
          $timeout = 100;
       ```
   
 * Insert `@session_write_close();` so that it looks like this:
 *     ```
          // Make sure PHP process doesn't die before loopback requests complete.
          @set_time_limit( 300 );
          @session_write_close();
          // Time to wait for loopback requests to finish.
          $timeout = 100;
       ```
   
 * Obviously, next time you update WordPress you will likely need to apply the above
   changes again.
 *  Thread Starter [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * (@finalwebsites)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/file-edit-function-doesnt-work-for-php-files-anymore/#post-10635534)
 * Thanks for the information. I searched the web before but there wasn’t that information
   available. (at least for my search :))

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

The topic ‘File edit function doesn’t work for PHP files anymore’ is closed to new
replies.

 * ![](https://ps.w.org/ninjafirewall/assets/icon-256x256.png?rev=976137)
 * [NinjaFirewall (WP Edition) - Advanced Security Plugin and Firewall](https://wordpress.org/plugins/ninjafirewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninjafirewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninjafirewall/)
 * [Active Topics](https://wordpress.org/support/plugin/ninjafirewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninjafirewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninjafirewall/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/file-edit-function-doesnt-work-for-php-files-anymore/#post-10635534)
 * Status: resolved