skip to Main Content

How to Fix “WordPress Requires the JSON PHP Extension” Error on Shared Hosting

WordPress Requires the JSON PHP Extension

When installing or running WordPress 6.8.2 (or higher), you might see this error: WordPress requires the JSON PHP extension.

This means your server’s PHP configuration does not have the JSON extension enabled.
Since WordPress relies on JSON for its REST API, Gutenberg editor, and many plugins, the extension is now mandatory.

Why This Happens on Shared Hosting

On shared hosting, the PHP configuration is controlled by your hosting provider.
However, you might still get this error due to:

  • Using the wrong PHP version

  • JSON extension being disabled in your account

  • Using an outdated PHP version without built-in JSON support

Steps to Fix the Error (Shared Hosting Users)

1️⃣ Select the Correct PHP Version

  1. Log in to your hosting cPanel

  2. Go to Select PHP Version or PHP Selector (name may vary)

  3. Choose PHP 7.4, 8.0, or 8.1 (use the latest stable version available)

  4. Click Set as current

2️⃣ Enable the JSON Extension

  1. On the same Select PHP Version page, scroll down

  2. Find and check the box for json or php-json

  3. Click Save or Apply

3️⃣ Verify JSON Extension is Enabled

  • Create a file named phpinfo.php in your website’s public_html folder:

        Code: <?php phpinfo(); ?>
  • Open it in your browser:
    https://yourdomain.com/phpinfo.php

  • Search for json — if it appears with details, the extension is active.

4️⃣ Clear WordPress Cache

If the extension is enabled but the error still shows:

  • Clear any WordPress cache (via your caching plugin)

  • Clear your browser cache

  • Refresh the WordPress dashboard

Final Tip

If you still can’t find the json option in your PHP Selector:

  • Contact your hosting provider’s support team

  • Ask them to enable the JSON extension for your PHP version

Latest Articles
October 27, 2026

Fixing the “cagefs_enter: Unable to fork” Error in cPanel/WHM

Few messages are as disruptive on a shared hosting server as cagefs_enter: Unable to fork. Terminal sessions refuse to open,…

October 26, 2026

Why Is My WordPress Website Slow? 10 Common Causes and Easy Fixes

Why Is My WordPress Website Slow? 10 Causes and Fixes (2026 Guide) Is your WordPress site loading slowly? Discover the…

October 25, 2026

How to Fix 403 Forbidden Error in cPanel!

Have you opened your website only to see a 403 Forbidden error? This error can be frustrating because it prevents…

Subscribe To Our Newsletter

Don't get left out of the loop, make sure you subscribe to our newsletter below so you can be notified of our latest insights, tips, tutorials, sales and more!

Discussion
Back To Top