Error: cURL error 28: Operation timed out after 5002 milliseconds with 0 bytes received
One of our readers recently inquired about how to disable PHP errors in WordPress. PHP warnings and alerts assist programmers in troubleshooting problems with their code. When they are accessible to all of your website visitors, though, it appears highly unprofessional. We’ll teach you how to turn off PHP errors in WordPress in this post.
Many of our new users wonder why their contact form plugin isn’t sending emails or why they aren’t receiving any WordPress alerts.
We’ll teach you how to cure the WordPress not sending email problem in this post, so your website can send emails more reliably and avoid the spam folder.
Line warnings in PHP scripts are frequently caused by outdated plugins or themes. This is because core files are frequently updated with WordPress upgrades, rendering some code outdated.
When utilized with something that is incompatible, themes and plugins can also generate PHP warning messages. It’s possible that two existing plugins that perform properly separately can cause problems when used together. This is due to the fact that each developer is unique, and not everyone develops website files using the same syntax.
Fortunately, these alerts do not always imply that the site is down. To the untrained eye, they simply appear to be unattractive. The developer will occasionally release an update to remedy the warning, although this does not usually happen quickly.
The following is an example of a PHP warning in WordPress:
“on line 30 of /wp-content/plugins/siteplugin.php”
This isn’t to say the plugin isn’t useful. It simply signifies that a portion of the file is incompatible with WordPress, the theme, or another plugin.
Unless you intend to fix the coding yourself, it’s generally best to just turn off the warning alerts. The warning may not fully apply to you if the tool isn’t completely broken or unusable.
This next part involves editing the wp-config.php file of WordPress.
Before making any code changes, I highly advise you to make a backup of your site. This will safeguard you in the event that something goes wrong by allowing you to restore the site quickly.
You have several methods available for accessing the wp-config.php file of WordPress. Many individuals prefer to access website resources using FTP programs like FileZilla.
I’m going to use the File Manager in cPanel for this lesson.
Access your website by clicking the “public_html” folder in the directory.
Select the wp-config.php file and click, “Edit.” It’s located in the top tool bar of File Manager.
On the new window, click the “Edit” button. This is just a notification enabling you to change the editor’s character encoding. This part will not require any modifications.
Scroll down and find the line that has this code:
define(‘WP_DEBUG’, false);
You may see “true” instead of false. Either way, you’re looking for the “WP_DEBUG” portion of the wp-config.php file.
Replace the line with the following code:
1
2 3 4 |
ini_set(‘display_errors’,’Off’);
ini_set(‘error_reporting’, E_ALL ); define(‘WP_DEBUG’, false); define(‘WP_DEBUG_DISPLAY’, false); |
You’re done when you click the Save Changes button in the top-right corner. You won’t notice any PHP error messages if you delete your browser cache and examine your website now.
Congratulations, PHP errors will no longer be shown on your WordPress site.
User discussion forum
Have questions or need help?
Articles that cover common questions.