I added code php to "My custom function" plugin and Then he got a with me problem white screen can you help me for delete this code from My custom function?
You will have to go access your site from an FTP account, if you don't have one, go to your server and create one (or request one), then since you know what file was the one in which you were working on, download that file, edit it on your machine deleting the code that is causing the problem, and finally upload it again. Done.
If you know the file the error is coming from, you can paste the contents of your plugin file into an online PHP syntax tester such as this. This can help you pinpoint and eliminate common syntax errors that are not obvious to the untrained (or tired or overworked) eye. Note there are many other types of errors of course that this will not help with, but it's a good first step and possible easy solve. WordPress-specific code can be added to your question (or preferably a new, more specific question than this very general one) if you need help with that.
If you are getting a "white screen of death", it usually means you are getting an error - but no error output. But since errors are logged on most hosts by default, you can check for
error_logfiles in your root folder depending on your PHP config (unless the error is happening in
/wp-admin/only in which case you need to check for those in that folder instead!) To get the error output to display on screen, you can add
ini_set('display_errors', 1);to your
/wp-config.phpfile. A fatal error will likely indicate the problematic code lines.
Activate debug mode by adding
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true);to your
/wp-config.phpfile... Load the page again and check for errors logged in the file
/wp-content/debug.log. Or if you want the errors output on screen (similar to step above) then add
define('WP_DEBUG_DISPLAY', true);Note sometimes you will get warnings and deprecation notices this way (especially if you have any older plugins) and other errors that don't mean so much - the last (fatal) error is usually the breaking one. Just remember to turn off
WP_DEBUGmde when you are done otherwise your server might fill up with a massive log of useless warnings and crash due to running out of disk space.
If you still don't get an error on screen, can't find it in your logs (or are getting a 500 internal server error) you will need to check your server logs instead of just your PHP logs. Sometimes these logs are available via your hosting control panel, but other times they are not (or just blank there.) Unfortunately the actual server error log path is different places depending on your server operating system, so you'll need to search online for that location to be able to find the relevant server log for your site.
Disable the plugin by renaming it's file or folder via FTP (or if you have to, by file explorer in your control panel.) At least now you will (usually) have access to your site. (If you do not regain access to your site this way, you will have to look elsewhere for the cause.) If you want to actually disable the plugin, you can now visit
/wp-admin/plugins.phpand it will be disabled because the file/folder will not be found as it has been renamed. You can now rename the actual file back and the plugin will remain inactive until you activate it again.
You could try to display errors by adding this code to the top of your functions.php file to display errors and then debug from there?
ini_set( 'display_errors', 1 );