PHP errors are frustrating problems on your WordPress site. If you do not fix it, then it slow down your frontend pages, freeze plugins, and affects on SEO rankings, and even take you out from your website.
If you have business website, then you must fix PHP errors quickly, to prevent your SEO rankings from down badly.
In this guide, we will tell you common PHP errors with its solutions.
There are some common PHP errors that affect your website. Below, we tell you common PHP errors with their solutions.
Parse error: syntax error, unexpected ‘}’
Deprecated: Function get_magic_quotes_gpc() is deprecated
Fatal error: Call to undefined function function_name()
Once you know the causes of PHP errors on WordPress, you must know the solutions to fix them.
Here is step by step guide you should follow to resolve this error:
To resolve the PHP error, you should enable WordPress debugging to dive deep into the cause of this issue.
Here how you can easily enable debugging:
wp-config.php
file in the root WordPress directory.define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
wp-content/debug.log
for review.The above steps log PHP errors to a file called debug.log
in the wp-content
directory and allow you to review these errors to fix it.
If your wordpress site is run out of memory, then also it cause PHP error. So, the easy solution to fix it by increasing the memory limit. It allows your WordPress site to run smoothly.
Let us tell you step by step guide to increase memory limit and fix this error:
define( 'WP_MEMORY_LIMIT', '32M' );
'32M'
to '256M'
:
define( 'WP_MEMORY_LIMIT', '256M' );
/* That's all, stop editing! Happy publishing. */
The above steps will increase the memory limit to 256MB. If you still face errors, then you can follow the next solutions in this guide.
The another common cause of PHP errors is plugin conflicts. To check if this is an error, you should deactivate all plugins and check if the error occurs or not.
Here is how you can easily deactivate all plugins on the WordPress site:
If still this error occurs after deactivating all plugins, then you should reactivate all plugins one by one and find out a specific plugin that causes this error.
If you do not find any plugins that cause PHP errors, then it may caused due to theme conflicts. So, you must switch to the default WordPress theme to check if the error occurs by the theme.
If the error is resolved, then you should update your original theme or switch to the default theme or compatible themes.
If syntax errors are the reasons behind PHP error, then you should check your code (e.g., in a custom theme or plugin) for missing braces, semicolons and parentheses.
debug.log
to locate the file and line number where the error arises.Outdated themes, plugins, or WordPress can cause PHP errors and compatibility issues. So, ensure that everything is updated so your WordPress site works smoothly.
PHP errors are also caused because of Incorrect file permissions. So, you should check that your WordPress files and folders have the correct permissions.
644
.755
.You can check and update these permissions by using FTP client like FileZilla or through cPanel file manager.
Checkout our detailed guide on Fix WordPress File and Folder Permissions — to get more information! 💡
After trying all above solutions, if you face the PHP errors, then you must contact with your hosting provider. There are some limitations set by the hosting provider that cause this error.
If you face complex PHP errors, then you should check the PHP’s official documentation or WordPress-specific PHP resources. The documentation gives you valuable insights about syntax and functional and resolve these technical errors.
PHP errors can occur due to various reasons like outdated plugins, theme conflicts, memory issues, or incorrect code syntax.
PHP errors can slow down your website, break functionality, and even affect your SEO rankings, leading to poor user experience.
Fatal errors happen when WordPress calls a missing or undefined function. To resolve this, you can reinstall or reactivate the required plugin or theme.
You can increase the memory limit by editing the wp-config.php file and setting WP_MEMORY_LIMIT to a higher value (e.g., 256M).
Deactivate all plugins, and if the error disappears, reactivate them one by one to identify the problematic plugin.
Check and adjust the file permissions for WordPress files (644) and folders (755) using an FTP client like FileZilla or cPanel.
Identify and resolve PHP errors on WordPress is important to maintain user experience, functionality and security. By follow above step by step guide, use plugins and tools, check correct file permissions, you can ensure that your site is error free and optimized. It gives you a secure and seamless user experience and maintains your site integrity.
How to Internal Nofollow Links on WordPress? Internal Nofollow links affect your website SEO. If some internal links carry the “nofollow” attribute, then it enables the search engines to not pass the SEO values or rankings to your linked pages.
So, we have to fix the internal nofollow links on wordpress site, so our website get SEO optimized, gain organic traffic and high visibility.
Read this guide to identify and resolve the internal nofollows links on the WordPress website.
A nofollow link is link that tells search engine to not pass link authority to webpage, you are linked to. You can set any nofolow link, by add rel="nofollow"
attribute. Links or backlinks are crucial search engine ranking factors.
When you link it with external site, search engine take it as ranking signal and small portion of authority of your site to other page.
So, there is a need to fix these links quickly
<a href="https://example.com/page" rel="nofollow">Example Link</a>
This example, shows rel="nofollow"
attribute, that tells search engines to ignore the links while calculating rankings. It prevents your linked page to get SEO benefits from the link.
Nofollow links help to prevent SEO rankings affected by spammers, adhere to Google guidelines, and control link equity.
Here are its benefits,
Nofollow links prevent the link equity to passed to linked page, and do not affects SEO rankings. So, it plays a vital role in terms of SEO.
Let us look at the SEO impact on Nofollow links,
Here are steps you should follow to identify internal links with the nofollow attribute:
rel="nofollow"
attribute: After finding find link in the HTML code, see if it consists the rel="nofollow"
attribute. It shows you that the link has the nofollow property.If you found nofollow attributes in internal links and you want to fix it, then here are guides you should follow. First, ensure that you are not using nofollow for SEO purposes.
Once you confirm, here are further steps you should follow:
rel="nofollow"
attribute.rel="nofollow"
attribute, you should simply remove it from the code to fix this error.Before:
<a href="https://example.com/" rel="nofollow">Example Link</a>
After:
<a href="https://example.com/">Example Link</a>
You can use SEO plugins like Yoast or RankMath plugins to easily find nofollow links and fix this issue.
A nofollow link refers to a hyperlink that instructs search engines to ignore it, meaning they will not pass any link equity to the specific page. Hence, the linked page will not have any impact on the search ranking of the original page’s website.
Internal nofollow links are important for a website’s technical SEO. Even though should be ignored as files on wiki pages , it’s crucial for the SEO value to be correctly allocated for the internal linking structure within the website.
The nofollow attribute is most often used for untrusted external sources, paid and affiliate links, as well as user-generated content to prevent any possible SEO malpractice.
Nofollow links are useful as they help to manage the flow of spam, ensure that as a site owner, there is adequate control on how SEO is manipulated or not.
You can find these links by reviewing the source code of your page and looking for the rel=”nofollow” tag within your HTML code.
To delete the nofollow attribute, go to the HTML editor of a particular page where the hyperlink is located, find rel=”nofollow” and erase the attribute from the tag.
Yes, they are essential for the effective distribution of link authority for SEO purposes in addition to making sure your website abides by Google rules.
While nofollow links are not detrimental to SEO in themselves, improper implementation and oversaturation could stop valuable pages from receiving link equity.
It is a good idea to regularly audit nofollow links, especially after new content changes have been made or new SEO strategies put into effect.
Regularly audit your website for nofollow links and remove them from internal pages where they aren’t necessary. By doing so, you ensure that your site benefits from full SEO value, enhancing its authority and organic search visibility.
In the internal link nofollow removal process of a WordPress website, it is necessary to insert nofollow attributes at the correct locations. If unchecked, those links can cause a website not to optimally make use of its internal architecture, stifling the overall SEO strategy of a website. Internal links with the nofollow attribute set will pass no SEO value to the linked page and removing that attribute will ensure that SEO value is passed correctly within the internal architecture of the website. This process ensures that a site not only receives organic traffic, but it also immensely improves the chances of a site content being crawled and indexed by the various search engines. Such processes performed periodically usually lead to a healthy website. In this case, it ensures the site is healthy and optimized for search engines.
This article is a valuable resource for anyone looking to nofollow SEO their internal links within a WordPress site. The completion of this task ensures that the website has a better ranking on Google, Bing, or any other search engine. Also checkout Spexo theme, SEO Optimized WordPress Theme.
URL redirects are important when you need to change your website address permanently or temporarily. Due to this activity, sometimes your website is stuck in a redirection loop. If this problem occurs, then the ERR_TOO_MANY_REDIRECTS error appears on your WordPress website. This error restricts you to enter to specific pages of your website.
This problem usually occurs in browser, your website, server, programs or third party plugins. The common causes of this error are corrupt .htaccess files, misconfigured website URLs, outdated cache or plugins or themes conflict. Thanks to the solutions available to fix this redirection issue. When you know the cause of redirection WordPress issues, then you can easily find a solution and fix it.
In this guide, we will tell you the common causes of the too many redirects errors and solutions to fix them. So, let’s read it.
From understanding the “ERR_TOO_MANY_REDIRECTS” error to its causes and impact on your WordPress website, here we cover everything.
Too Many Redirects Error is the error shown on your wordpress site. It means that the server incorrectly instructs the browser to switch between different URLs. It creates redirection loop where the browser tries to load pages and redirected it back and forth.
Here are some typical reasons for this error:
.htaccess
file is corrupted with faulty rules or incompatible plugins, then it creates a redirect loop.If your website shows you Too Many Redirects Error, then you are unable to access this site. Visitors are unable to access to front end, and admins are unable to access to back end. It badly impacts on website functioning, as follows as:
The Too Many Redirects Error appears in different forms on different browsers. It has the following variations.
Once you understand the causes, impact, and variations of the Too Many Redirects Error, you are ready to resolve this error. Here, we tell you some troubleshooting ideas to solve this issue.
Note: You may not need to apply every solution. Begin with the first fix and check if the error is resolved. If it persists, move on to the next fix. Stop once the error no longer appears on your site.
Caches allow the browser to store your site data locally and show it on return visits to boost load time. But sometimes, cached data are outdated. If redirection loop error was temporary glitch, then you can resolve it by look at cache version with error.
To ensure if clearing cache can fix this issue, clear your cache and refresh the web page. Checkout the given guides to know how to clear caches on different devices and browsers:
Follow the next solution if you still facing the same error
Caching Plugins are work to increase your site performance, but sometime it stuck your site in redirection loop. It causes a Too Many Redirects Error. So, if this error occurs, you should clear the caching plugin cache.
The clearing cache steps are vary based up on plugin you use, so you should check plugin guide. To simply clear cache, click on the “purge cache” or “clear cache” option in plugin settings.
Let us guide you to clear the cache in the W3 total cache:
After completing these steps, refresh your wordpress site again. If you are still stuck in redirection loop, then follow the next solution.
Another cause of the ERR_TOO_MANY_REDIRECTS error is the wrong URL settings. The Site Address (URL) and WordPress Address (URL) are common culprits of this issue.
Site Address and WordPress Address must match to prevent this error. If it do not match, then you must correct URL, to resolve this redirect error.
If you can’t access to admin area on your WordPress site due to this error, then you must change the settings manually by using cPanel or FTP client. This method modify the wp-config.php
file to apply to right URLs. Let us tell you how you can easily update URL settings by using FTP:
wp-config.php
file in directory of your WordPress site.wp-config.php
file on desktop of your computer.
Next, open this file in text editor such as Notepad (On windows) or TextEdit (on Mac). Now, search for these lines:
define( 'WP_HOME', 'https://example.com' ); define( 'WP_SITEURL', 'https://example.com' );
Replace https://example.com with your website domain name. After you make changes, save the files and upload them to your site. This method solves your problem if it cause because of improper URL.
If you do not find WP_HOME
and WP_SITEURL
definitions in your wp-config.php
file, then copy and paste the code at the top of your file. So, ensure to first replace example.com with your actual website URL.
cPanel also helps you to update URL settings and fix redirect errors. For this, login to your hosting account and access it. The cPanel location are vary on basis of hosting service. Some hosting services also provide you own custom control panels.
Here are steps you should follow to find cPanel on your hosting service provider.
Now, a file opens in a new tab. You should check the file and look for the code snippet given below:
define( 'WP_HOME', 'https://example.com' ); define( 'WP_SITEURL', 'https://example.com' );
Cross-check check both URLs are correct. If you see it incorrect, then edit it match to your actual site address and click on Save button on top of page.
If you do not find the WP_HOME
and WP_SITEURL
definitions in your wp-config.php
, then simply copy and paste the code snippets at the top of the wp-config.php file. Remember to replace example.com with your actual website URL.
Corrupted or Conflicting redirect rules in .htaccess
file can also cause ERR_TOO_MANY_REDIRECTS error. To resolve this error, you must delete the current .htaccess
file and create a new file.
Here are the steps to follow to create new.htaccess file:
.htaccess
file.It is important file, so keep the copy in your computer as backup.
Once you keep a copy of .htaccess
file, delete it from your site.
Refresh your page and try to access to your site now, to check if this error resolved. Moreover, wordpress automatically generate new .htaccess
file, but still you should confirm it.
For this, open the WordPress dashboard, go to Settings → Permalinks, and tap on Save Changes.
Plugins conflicts are another major cause of ERR_TOO_MANY_REDIRECTS error.
To identify problematic plugins, you must disable all plugins temporary and check if it solve the issue.
As same as the above solutions, you can do it from the backend of your site.
It successfully disables all plugins on your site.
Check your site is the error is resolved. If the error is resolved, it confirms that it is because of a plugin conflict.
Next, you must identify the culprit plugin by following the given steps:
This error occurs when your website enters a redirection loop, causing the browser to fail in loading the page.
Incorrect URL settings, plugin conflicts, corrupted .htaccess files, outdated cache, and server issues are common causes.
Update the WP_HOME and WP_SITEURL values in the wp-config.php file or via the WordPress dashboard.
Yes, a corrupted .htaccess file can trigger redirect loops and must be regenerated.
Ensure the Site Address (URL) and WordPress Address (URL) match exactly in the dashboard.
The too many redirects error is occurs on your wordpress site, when your site are stuck in redirect loop. There are various reasons behind this error, such as outdated cache, misconfigured URLs, plugins or theme conflicts, corrupted .htaccess
file.
Ensure to follow the above solutions to fix this redirect error. The above solutions guide by us consists purge cache from caching plugin, clear browser cache, update your site URL in wp-config.php file, delete the corrupted .htaccess file, disable plugins temporarily and remove tricky plugin. Still if you are facing issue related to login issue checkout guide to fix WordPress admin login issue.
Hope this guide helps you to fix this error. For more tips, tutorials, and updates, keep following blog regularly. If you need more assistance regarding the too many redirects error, then you can contact our support team anytime.
Enter Your Email Address to Know About the Latest Updates & Features.