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
September 15, 2025

How to Add Profile Picture in Webmail Using Gravatar

Having a professional email address is important, but adding a profile picture makes it even more personal and trustworthy. In…

August 23, 2025

How to Disable Copy Paste in WordPress (Step by Step Guide)

On many websites, you might have noticed that the content cannot be copied or selected. Even when you right-click, options…

August 22, 2025

🚀 How to Fix “Unknown collation: ‘utf8mb4_0900_ai_ci’” in cPanel

If you use MySQL or MariaDB, you might have encountered the following error: Unknown collation: 'utf8mb4_0900_ai_ci' 🔎 Why This Happens…

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