Title: Deprecated: Function create_function() is deprecated
Last modified: October 8, 2021

---

# Deprecated: Function create_function() is deprecated

 *  Resolved [muscleman](https://wordpress.org/support/users/xxman2021/)
 * (@xxman2021)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-5/)
 * hi every body
    my web site debug send me this error:
 * Deprecated: Function create_function() is deprecated in /home/*****/public_html/
   wp-config.php on line 79
 * line code in config.php :
    add_filter(‘filesystem_method’, create_function(‘$
   a’, ‘return “direct”;’ ));
 * any body can send me fixed code ?

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

 *  [hiyottaunits](https://wordpress.org/support/users/hiyottaunits/)
 * (@hiyottaunits)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-5/#post-14949799)
 * Hi [@xxman2021](https://wordpress.org/support/users/xxman2021/),
 * You can try
 *     ```
       function change_filesystem_method($method) {
         return 'direct';
       }
       add_filter('filesystem_method', 'change_filesystem_method');
       ```
   
 *  Thread Starter [muscleman](https://wordpress.org/support/users/xxman2021/)
 * (@xxman2021)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-5/#post-14949811)
 * hi
    nt working …with ur code web site down
    -  This reply was modified 4 years, 8 months ago by [muscleman](https://wordpress.org/support/users/xxman2021/).
 *  Thread Starter [muscleman](https://wordpress.org/support/users/xxman2021/)
 * (@xxman2021)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-5/#post-14949839)
 * that error is from update PHP core host …ver5 to 7
 * The function should be defined as follows :
    error code: create_function(‘$a’,‘
   return “direct”;’ )
 * create_function became change must use function()
 * any body can change this line code :
 * add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));
 *  Thread Starter [muscleman](https://wordpress.org/support/users/xxman2021/)
 * (@xxman2021)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-5/#post-14952185)
 * Cereno Deng (@hiyottaunits)
    i check ur solutions again tanx my problem solved
   by your solutions

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

The topic ‘Deprecated: Function create_function() is deprecated’ is closed to new
replies.

## Tags

 * [solved](https://wordpress.org/support/topic-tag/solved/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [muscleman](https://wordpress.org/support/users/xxman2021/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-5/#post-14952185)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
