Sometimes we face problems with our WordPress site. Today I’ll discuss three common errors in WordPress and possible ways to fix them.
How to Fix WordPress Syntax Errors
Most of the time, a beginner faces a syntax error. It’s a common problem in WordPress. Most of the time, the problem is caused by a php file. When there is a missing syntax like semicolon, colon, underscore or any type of syntax that is used in PHP, we get a error message in the browser. If you face the same problem, don’t panic. It’s easy to solve .
( ! ) Parse error: syntax error, unexpected ‘,’ in C:\wamp64\www\test_site\wp-content\themes\twentyseventeen\functions.php on line 376 |
---|
There is a syntax/parse error in my twenty-seventeen theme’s functions.php file on line 376.
So we’ll locate the functions.php file, find the problem, and fix it.

Here in function.php’s 376 number line, there is an additional comma (,) that is causing the error. Just remove the comma (“,”) and save the file. Then reload the page. And it works fine.
How to Fix the 404 Not Found Error
Fix in Permalinks
Most of the time, this error is caused by your permalink structure. If the problem is caused by permalinks, then simply navigate to Dashboard->Settings->Permalinks. Set the permalink type to Post name as shown below and save the changes.

I hope this will work.
Edit .Htaccess
Sometimes this problem is caused by a.Htaccess file in your theme. Modifying that file may solve the problem. Make your.Htaccess file like shown below.
# BEGIN WordPress
<IfModule mod_rewrite.c >
RewriteEngine On
RewriteBase /test_site/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /test_site/index.php [L]
</IfModule>
# END WordPress
Note: Here, tests_site is my site directory on localhost. Use your own.
How to Fix the Connection Timed Out Error
Sometimes we face this error that say Connection Timed out. This may cause exceeding the maximum execution time but no response from the server.
Maybe you are using shared bandwidth that is slowing down your server. In that case, upgrade your hosting plan.
Sometimes it may cause a plugin. To solve this, deactivate your plugins one by one and detect where they lie.
Increasing your PHP memory may solve the issue. Just go to the wp-config.php file and add the line below.
define( ‘WP_MEMORY_LIMIT’, ’64M’ );
To get more tips and tricks like this, stay with Code Astrology.