Toute nouvelle application WP sur l’hébergement Cloudways. Leur support technique incapable de résoudre. La mise à jour via le backend ou WP CLI entraîne une erreur. Répertoire créé mais fichiers non copiés dedans. Semble être une erreur PHP.

Installing Media Cleaner – Clean & Optimize Space (6.4.5)                                                                                                
Downloading installation package from https://downloads.wordpress.org/plugin/media-cleaner.6.4.5.zip...                                                  
Unpacking the package...                                                                                                                                 
Installing the plugin...                                                                                                                                 
PHP Fatal error:  Uncaught Error: Call to undefined function fcp_copy_dir() in /home/path/to/my/wordpress/app/public_html/wp-admin/includes/fi
le.php:1896                                                                                                                                              
Stack trace:                                                                                                                                             
#0 /home/path/to/my/wordpress/app/public_html/wp-admin/includes/class-wp-upgrader.php(596): copy_dir()                                        
#1 /home/path/to/my/wordpress/app/public_html/wp-admin/includes/class-wp-upgrader.php(798): WP_Upgrader->install_package()                    
#2 /home/path/to/my/wordpress/app/public_html/wp-admin/includes/class-plugin-upgrader.php(137): WP_Upgrader->run()                            
#3 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(552): Plugin_Upgrader->install()                                      
#4 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php(209): Plugin_Command->install_from_repo()                  
#5 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(809): WP_CLI\CommandWithUpgrade->install()                            
#6 [internal function]: Plugin_Command->install()                                                                                                        
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Di in /home/path/to/my/wordpress/app/public_html/wp-admin/includes/file.php on lin
e 1896                                                                                                                                                   
Fatal error: Uncaught Error: Call to undefined function fcp_copy_dir() in /home/path/to/my/wordpress/app/public_html/wp-admin/includes/file.ph
p:1896                                                                                                                                                   
Stack trace:                                                                                                                                             
#0 /home/path/to/my/wordpress/app/public_html/wp-admin/includes/class-wp-upgrader.php(596): copy_dir()                                        
#1 /home/path/to/my/wordpress/app/public_html/wp-admin/includes/class-wp-upgrader.php(798): WP_Upgrader->install_package()                    
#2 /home/path/to/my/wordpress/app/public_html/wp-admin/includes/class-plugin-upgrader.php(137): WP_Upgrader->run()                            
#3 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(552): Plugin_Upgrader->install()                                      
#4 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php(209): Plugin_Command->install_from_repo()                  
#5 phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(809): WP_CLI\CommandWithUpgrade->install()                            
#6 [internal function]: Plugin_Command->install()                                                                                                        
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Di in /home/path/to/my/wordpress/app/public_html/wp-admin/includes/file.php on lin
e 1896                                                                                                                                                   
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

Essayé avec divers plugins et thèmes ; même résultat.

La version PHP et la version SQL sur le site d’origine correspondent à la destination.

Il semble que la migration Cloudways ne se soit pas terminée correctement. La réinstallation de WordPress à partir du tableau de bord l’a résolu.

Pour le bénéfice de quiconque trouve cela à la suite d’une requête de recherche, j’ai eu le même problème avec fcp_copy_dir() fonction introuvable.

Cause : J’avais migré le site à partir d’une instance Flywheel. fcp_copy_dir() semble être une fonction Flywheel personnalisée qu’ils ont ajoutée au noyau WP. Core WP rencontre des erreurs lorsqu’il est exécuté dans des environnements autres que Flywheel.

Diagnostic : Utilisation wp core verify-checksums pour valider l’intégrité du noyau WP. Dans mon cas, cela montrait que 3 fichiers avaient été modifiés.

Résolution : revenir à un noyau WP propre.

user11860704 est un nouveau contributeur à ce site. Prenez soin de demander des éclaircissements, de commenter et de répondre. Consultez notre code de conduite.