Wordpress error fixes

How to resolve WordPress errors 1.0

ERRORS WHILE INSTALLING THEMES

  1. With the premium theme, the error “ package could not be installed. The theme is missing style.css stylesheet”

Cause: Uploading the Wrong Zip File

Solution:

To resolve return to theme provider and download the correct format, i.e Installable wordpress file only

You can get the file as below

  1. Fatal error: Allowed memory size of 1040  bytes exhausted

Cause: Exceeding the Memory Limit

Solution:

  • Find the wp-config.php file in the cpanel under file manager
  • edit limit on define line to higher limit such as 256M, 512M etc

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

  1. Server Error (500 Server error) thus unable to publish my Elementor website

cause:Too many updates 

Solution:

-Go to the page with the error to click on the arrow next to the Update/Publish button.
-Choose Save as Template,to save it in the Elementor library using the new name.
-Open a new page and click on Add template.

-Click My Templates and click Import to upload the saved template

Alternative: Duplicate a working page as guided below

  • Login to the elementor library
  • Select My Templates to find your saved templates 
  • Scroll to your preferred template
  • Click the Insert option on the page you want. 
  • Increase the  WordPress memory limit on your  cpanel account
  • Elementor Library
  1. Navigating the wordpress dashboard takes forever to load.

Cause: Exceeded resource usage in your Cpanel such as CPU/RAM/IO usage

Solution:

  1. Identify the cause of high resource usage, so you can take appropriate action.
  2. Update your WordPress version if out of date.
  3. Updating plugins/themes that require an update.
  4. Avoid beta versions of plugins/themes- Disable any plugins/themes that are beta versions.
  5. Install caching plugins eg w3 total cache, wp super cache
  6. Disabling wp-cron.
  7. Only activate the plugins/themes you need for your website.
  8. Avoid resource-intensive plugins/themes.
  9. Increasing php memory limit, recommended limit >> 512M
  10. For busy sites, consider migration to VPS/ Dedicated server that has dedicated resources and will optimize the performance.

5. WordPress site shows a blank page

Causes: There are several causes why a wordpress site can result in a blank page these include

Incompatible wordpress themes/ plugins

Resource exceeded such as memory limit

Parse or syntax error

Caching

Corrupted file (mostly index.php)

Server down resulting to database inaccessible

.htaccess file configurations

Solution:

-Check if there are recent updates on the plugin/themes/wordpress files

– Any updates, can be checked if they caused conflict by disabling involved conflicting plugins/themes 

– To check for corrupt file, check the file size, you could also rename the index.php to see if list of files appear,if the list appear replace the index.php file through uploading an updated wordpress version

– For resources, check on cpanel under resource usage to view affected resources, increase resources as guided by hosting provider

– Caching, you can clear cache on your website by deactivating cache plugin then reactivating again

– Server down/database down- consult with hosting provider to resolve the matter

– Rename .htaccess file causing issue.

– You can add additional security measures by activating mod-security to prevent unauthorized updates on your site.

6. I published pages but I realized that most of the pages have many types of errors that are affecting my traffic. sitemap showing 404 error

Cause: Recent updates or changes to your website’s content or structure not indexed.

To resolve the issue, kindly regenerate your sitemaps and submit your site to Google for indexing.

Url: https://truehost.com/support/knowledge-base/submit-my-website-to-google-for-indexing/

 Wordpress Sitemap generator

7. Publishing failed. The response is not a valid JSON response.

Causes: 

  • Block editor  related issues
  • Wrong address on website url or site address (when a change of domain occurs)
  • If SSL fails to secure some parts of site such as images leading to mixed content
  • False positives generated by additional security  WAF plugins such as Wordfence.

Solution:

  1. To resolve block editor issues, activate another editor or update the current editor to the latest version.
  2. To resolve wrong address, manually update the url using the wordpress manager or on the database
  3. To resolve SSL issue with mixed content, re-install the SSL again, login to wordpress dashboard and install plugin search replace 

Better search replace plugin settings

  • Under search for enter  http://  under replace with enter https://
  • Highlight all tables and select Run as dry run to see affected tables
  • Click Run Search/Replace to view results
  • Now with confirmed list, deselect run as dry run
  • Select Replace GUIDs and click Run Search/Replace
  • Proceed to repair permalinks under settings. Recommended permalink is post

Url: https://truehost.com/support/knowledge-base/how-to-fix-broken-permalinks-in-wordpress-404-error-page-not-found/

  • Now your website issue caused by mixed content is resolved
  1. To resolve false positives from security WAF plugins such as wordfence, deactivate WAF plugins and identify the cause of false positives, once resolved activate the plugin.

8. Fatal error: Uncaught Error: Call to undefined function

Causes:

  •  Failed wordpress update that creates .maintenance file
  • Outdated wordpress version
  • Incompatibility of plugin/themes

Fatal error: Uncaught Error: Call to undefined function str_contains() in /home/fa_/public_html/wp-includes/load.php:1618 Stack trace: #0 /home/fa__/public_html/wp-includes/default-constants.php(43): wp_convert_hr_to_bytes(‘-1’) #1 //home/fa__/public_html/wp-settings.php(62): wp_initial_constants() #2 //home/fa__/public_html/wp-config.php(100): require_once(‘/home/fa__/…’) #3 //home/fa__/public_html/wp-load.php(50): require_once(‘/home/fa__/…’) #4 //home/fa__/public_html/wp-admin/admin.php(34): require_once(‘/home/fa__/…’) #5 //home/fa__/public_html/wp-admin/index.php(10): require_once(‘/home/fa__/…’) #6 {main} thrown in //home/fa__/public_html/wp-includes/load.php on line 1**8

Truehost

Solution

  1. If handling failed auto-update, search for .maintenance  file and delete it, then perform a manual wordpress update.  https://wordpress.org/documentation/article/upgrading-wordpress-extended-instructions/
  2. To resolve outdated wordpress version using automatic update

Url: https://truehost.com/support/knowledge-base/how-to-update-your-wordpress-installation/

  1. Deactivate incompatible plugins/themes and replace them with compatible plugins/ themes

Url: https://truehost.com/support/knowledge-base/how-to-deactivate-wordpress-plugins-from-the-cpanel/

Leave A Comment?