[otw_shortcode_quote border_style=”bordered” background_pattern=”otw-pattern-1″]In this blog post, you are going to learn how you can fix common errors like ‘Connection Timed Out’, ‘Warning: Cannot Modify Header Information – Header Already Sent By…’ & ‘Posts Returning 404 Error’ on your WordPress websites. [/otw_shortcode_quote]
In my last blog post, I shared a few common errors that you could face with your WordPress website and in this post, I am going to add a few more points. So, here they are:
#4 Connection Timed Out Error
This error is usually due to an overburdened server. Possibly, there could be 3 reasons for this issue:
a. Your plugins are not compatible with your web hosting configuration or they are too heavy
b. PHP memory limit
c. Theme errors
To resolve this issue, below are the solutions that you could perform:
a. Try to switch off the recently installed plugins or rename the plugins folder itself.
b. Increase PHP memory limit
c. Try to activate & run your website on a basic theme like Twenty Twelve
#5 Warning: Cannot Modify Header Information – Header Already Sent By…
This is another warning that beginner WordPress developers face. This error is due to white space left in the WordPress configuration file (wp-config.php). Usually, this error () would be accompanied by the exact location of a problem for eg. below:
[cc]Output started at /blog/wp-config.php:27)[/cc]
So, you know exactly the location where you need to check for white spaces and remove them. Just in case, you don’t know how to do this, below is a simple process:
- Download the affected file (e.g. wp-config.php) via FTP or File Manager at Control Panel
- Open the file in your preferred editor (e.g. Notepad++)
- Remove all spaces before the first <?PHP (The first <?PHP should be in the first line)
- Remove all spaces after the closing ?>
- Save your file & upload it back
#6 Posts Returning 404 Error
There may be a case sometimes when you will not be able to view your posts and you will see a 404 error (which is page not found). There are two simple solutions to this error:
a. Through Permalinks
All you need to do is. Go to Settings -> Permalinks and hit the Save Changes button. It should resolve the problem and if it doesn’t, perform an action (b).
b. Through the .htaccess file
Go to the root location of your WordPress website or blog and edit the .htaccess to write the below codes. If the .htaccess file doesn’t exist at all, create a new one and paste the below codes:
[cc]# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule. /index.php [L]
</IfModule>
# END WordPress[/cc]
Save and upload the .htaccess back.