Title: Causing Fatal Error with WP CLI
Last modified: April 28, 2022

---

# Causing Fatal Error with WP CLI

 *  Resolved [justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/)
 * (@justin-bigscoots)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/)
 * Running 4.1.10
 *     ```
       PHP Fatal error:  Uncaught Error: Call to undefined function wp_generate_password() in /home/nginx/domains/domain.com/public/wp-admin/includes/file.php:677
       Stack trace:
       #0 /home/nginx/domains/domain.com/public/wp-admin/includes/class-wp-filesystem-ftpext.php(138): wp_tempnam()
       #1 /home/nginx/domains/domain.com/public/wp-content/plugins/responsive-menu/v4.0.0/inc/classes/class-theme-manager.php(436): WP_Filesystem_FTPext->get_contents()
       #2 /home/nginx/domains/domain.com/public/wp-content/plugins/responsive-menu/v4.0.0/inc/classes/class-theme-manager.php(850): RMP\Features\Inc\Theme_Manager->get_themes_from_uploads()
       #3 /home/nginx/domains/domain.com/public/wp-content/plugins/responsive-menu/responsive-menu.php(170): RMP\Features\Inc\Theme_Manager->get_menu_active_themes()
       #4 /home/nginx/domains/domain.com/public/wp-content/plugins/responsive-menu/responsive-menu.php(185): rm_includes_menu_theme_template()
       #5 /home/nginx/domains/domain in /home/nginx/domains/domain.com/public/wp-admin/includes/file.php on line 677
       ```
   

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

 *  [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * (@sumitsanadhya)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15603734)
 * Hi Justin-bigscoots,
 * I need to discuss this with my development team. Hopefully, I will get back to
   you with the solution.
 * Regards,
    Sumit
 *  [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * (@sumitsanadhya)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15616010)
 * Hi justin-bigscoots,
 * This is a known issue and we will be extremely grateful if you can help us by
   providing the steps to replicate this issue with WP CLI.
 * Regards,
    Sumit
 *  Thread Starter [justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/)
 * (@justin-bigscoots)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15616229)
 * Its really easy to reproduce, just run any WP CLI command.
 * Example:
 *     ```
       [13:37][root@21613.bigscoots-wpo.com public]# wp plugin install responsive-menu --activate
       Installing Responsive Menu – Create Mobile-Friendly Menu (4.1.10)
       Downloading installation package from https://downloads.wordpress.org/plugin/responsive-menu.4.1.10.zip...
       Unpacking the package...
       Installing the plugin...
       Clearing PHP OPcache opcode cache failed.
       Plugin installed successfully.
       Activating 'responsive-menu'...
       Plugin 'responsive-menu' activated.
       Success: Installed 1 of 1 plugins.
   
       [13:37][root@21613.bigscoots-wpo.com public]# wp user list
       PHP Fatal error:  Uncaught Error: Call to undefined function wp_generate_password() in /home/nginx/domains/learn-wpo.com/public/wp-admin/includes/file.php:677
       Stack trace:
       #0 /home/nginx/domains/learn-wpo.com/public/wp-admin/includes/class-wp-filesystem-ftpext.php(138): wp_tempnam()
       #1 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/v4.0.0/inc/classes/class-theme-manager.php(436): WP_Filesystem_FTPext->get_contents()
       #2 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/v4.0.0/inc/classes/class-theme-manager.php(850): RMP\Features\Inc\Theme_Manager->get_themes_from_uploads()
       #3 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/responsive-menu.php(170): RMP\Features\Inc\Theme_Manager->get_menu_active_themes()
       #4 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/responsive-menu.php(185): rm_includes_menu_theme_template()
       #5 /home/nginx/domains/learn-wpo.com/public/wp-settings.php(418): include_once('/home/nginx/dom...')
       #6 ph in /home/nginx/domains/learn-wpo.com/public/wp-admin/includes/file.php on line 677
       Fatal error: Uncaught Error: Call to undefined function wp_generate_password() in /home/nginx/domains/learn-wpo.com/public/wp-admin/includes/file.php:677
       Stack trace:
       #0 /home/nginx/domains/learn-wpo.com/public/wp-admin/includes/class-wp-filesystem-ftpext.php(138): wp_tempnam()
       #1 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/v4.0.0/inc/classes/class-theme-manager.php(436): WP_Filesystem_FTPext->get_contents()
       #2 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/v4.0.0/inc/classes/class-theme-manager.php(850): RMP\Features\Inc\Theme_Manager->get_themes_from_uploads()
       #3 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/responsive-menu.php(170): RMP\Features\Inc\Theme_Manager->get_menu_active_themes()
       #4 /home/nginx/domains/learn-wpo.com/public/wp-content/plugins/responsive-menu/responsive-menu.php(185): rm_includes_menu_theme_template()
       #5 /home/nginx/domains/learn-wpo.com/public/wp-settings.php(418): include_once('/home/nginx/dom...')
       #6 ph in /home/nginx/domains/learn-wpo.com/public/wp-admin/includes/file.php on line 677
       Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
       [13:37][root@21613.bigscoots-wpo.com public]#
       ```
   
 *  [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * (@sumitsanadhya)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15627144)
 * Hi Justin-bigscoots,
 * We tried to replicate the issue as per the steps provided by you. But as you 
   can see in the screenshot given below.
 * [https://nimb.ws/7WSIa2](https://nimb.ws/7WSIa2)
 * We are not getting any errors. I request you to please check the below-given 
   link and apply the workarounds mentioned in the document. Hope your issue will
   get resolved. Let me know if you need more help.
 * [https://responsive.menu/knowledgebase/rm-fatal-error-fs-method-of-ftpext/](https://responsive.menu/knowledgebase/rm-fatal-error-fs-method-of-ftpext/)
 * Regards,
    Sumit
 *  Thread Starter [justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/)
 * (@justin-bigscoots)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15628507)
 * You didn’t run any commands after the installing your plugin though.
 * It shows the plugin installed successfully which is correct, it won’t start throwing
   errors until after its installed and activated.
    -  This reply was modified 4 years, 1 month ago by [justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/).
 *  [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * (@sumitsanadhya)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15634805)
 * Hi [@justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/)
 * We tried the same command but in our case still, there is no error. Please check
   the below-given screenshot link.
 * [https://t1868024.p.clickup-attachments.com/t1868024/6bbcf20d-cd65-41c7-8f27-ab443f1082b3/image.png](https://t1868024.p.clickup-attachments.com/t1868024/6bbcf20d-cd65-41c7-8f27-ab443f1082b3/image.png)
 * However, when we change FS_METHOD settings in the wp-config file, then we can
   regenerate this error. Please check the screenshot.
 * [https://t1868024.p.clickup-attachments.com/t1868024/f3363967-41fc-45b2-99db-aee35d81e2d3/image.png](https://t1868024.p.clickup-attachments.com/t1868024/f3363967-41fc-45b2-99db-aee35d81e2d3/image.png)
 * Are you using define(‘FS_METHOD’, ‘direct’); in your wp-config.php file please
   confirm.
 * Regards,
    Sumit`
    -  This reply was modified 4 years, 1 month ago by [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/).
 *  Thread Starter [justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/)
 * (@justin-bigscoots)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15636767)
 * No, I have even tested this on a fresh install with your plugin being the only
   plugin. No modification to wp-config.php outside of updating database details
 *  [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * (@sumitsanadhya)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15638936)
 * Hi [@justin-bigscoots](https://wordpress.org/support/users/justin-bigscoots/),
 * Can you please add the below-given code in the wp-config.php file and then check.
   Let me know if you still face the same issue.
 * **define(‘FS_METHOD’, ‘direct’);**
 * Regards,
    Sumit
 *  [hovamanta](https://wordpress.org/support/users/hovamanta/)
 * (@hovamanta)
 * [4 years ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15647716)
 * bump into the same issue after update to 4.1.10, rolling back to 4.1.6 have it
   resolved.
 *  [efisher_osiris](https://wordpress.org/support/users/efisher_osiris/)
 * (@efisher_osiris)
 * [4 years ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15671095)
 * [@sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/), yes, if
   I add the extra define, then it removes the error for us. This is not default
   with the version of WordPress (latest). Is there any further update on how to
   resolve this? It sounds like 4.1.6 worked, so will you revert the code to the
   old behavior or are we forced to add this new define to our config file?
 *  [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * (@sumitsanadhya)
 * [4 years ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15727178)
 * Hi [@efisher_osiris](https://wordpress.org/support/users/efisher_osiris/) [@hovamanta](https://wordpress.org/support/users/hovamanta/)
 * Sorry for any inconvenience you had. There is no alternative available for it.
   You need to add define(‘FS_METHOD’, ‘direct’); in your wp-config.php file.
 * Let me know if you need more help.
 * Regards,
    sumit

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

The topic ‘Causing Fatal Error with WP CLI’ is closed to new replies.

 * ![](https://ps.w.org/responsive-menu/assets/icon-256x256.png?rev=1782326)
 * [Responsive Menu - Create Mobile-Friendly Menu](https://wordpress.org/plugins/responsive-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-menu/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [sumitsanadhya](https://wordpress.org/support/users/sumitsanadhya/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/causing-fatal-error-with-wp-cli/#post-15727178)
 * Status: resolved