Son muchas las ocasiones que hemos usado el plugin My Custom Functions para generar nuestras propias funciones PHP y así no tener estar tocando directamente el archivo functions.php.

Pero, ¿Qué ocurre si escribimos algun error en el código PHP y sin querer lo ejecutamos guardando los datos? Pues que puede llegar romper nuestra web, haciendo que nos salga un error muy feo:

Ha habido un error crítico en esta web

Nos enviarán un mail con un acceso de administrador, pero allí poco podremos hacer, ya que el plugin aparece deshabilitado, y al activarlo no nos dejará y mostrará algo así:

«Parse error: syntax error, unexpected ‘not’ (T_STRING), expecting….»

¿Cómo recuperar nuestra web?

Accediendo por FTP a nuestra web, buscar la carpeta «wp-content/plugins/my-custom-functions», y alli veremos estos archivos:

 

Pues bien, se trata de EDITAR el nombre de archivo START por STOP, y automáticamente el plugin nos funcionará correctamente, podremos editar la función incorrecta de PHP y luego volver a activarlo. De hecho en el archivo readme.txt explica cómo hacerlo paso a paso:

 

= Q. What to do if this plugin crashed the website? =
A. This plugin has a built-in functions for checking the custom code for syntax errors, duplicate functions names, and etc. But plugin is not perfect, so there are times when the entered custom code causes the error and white screen (WSOD). This is due to the fact that your custom code has a syntax error that this plugin could not detect. When this happens with you, please perform the following steps.

1. Access your server via FTP or SFTP. If you aren’t sure how usually your web hosting provider will have instructions somewhere on their website.
2. Browse to the directory `wp-content/plugins/my-custom-functions/`. Please contact your web hosting company to get help if you can’t find this folder.
3. Rename the file `START` to `STOP`. This will stop the execution of your custom code.
4. Log in to Admin Area of your WordPress website.
5. Go to the plugin settings page `Settings` -> `PHP Inserter`.
6. Edit/fix your custom PHP code that you entered before the crash.
7. Return to the plugin folder and rename the file `STOP` to `START` and you’re done!