🧩 How to Fix “WordPress Requires the JSON PHP Extension” Error on Shared Hosting
If you’ve ever installed or updated WordPress and suddenly saw the message “WordPress requires the JSON PHP extension”, don’t worry — it’s a common and easy-to-fix issue, especially on shared hosting platforms.
In this guide, we’ll explain what this error means, why it happens, and step-by-step how to fix it.
🧐 What Is the JSON PHP Extension?
The JSON (JavaScript Object Notation) PHP extension allows PHP to encode and decode JSON data.
WordPress (and many of its plugins) rely on JSON for tasks like:
- REST API communication
- Saving settings and options
- Theme and plugin updates
- Data exchange with external services
If the JSON extension isn’t enabled on your hosting server, WordPress will display this error.
⚠️ Why You See “WordPress Requires the JSON PHP Extension”
This problem usually happens when:
- You’re on shared hosting and your server’s PHP configuration lacks the JSON module.
- You’re using an outdated PHP version (below PHP 7.0).
- Your hosting provider accidentally disabled or misconfigured the extension.
🧰 Step-by-Step Fix for Shared Hosting Users
Step 1: Check Your PHP Version
- Log into your cPanel (or hosting control panel).
- Find “Select PHP Version” or “PHP Manager.”
- Verify your PHP version — it should be 7.4 or higher.
✅ Recommendation: Use PHP 8.0+ for best WordPress performance.
Step 2: Enable the JSON Extension
- In the same PHP Selector window, look for json or php-json in the list of extensions.
- Tick the checkbox next to it.
- Click Save or Apply Changes.
- Refresh your WordPress site and check if the error disappears.
Step 3: Verify the Extension Is Active
Create a simple PHP file in your site’s root directory:
<?php
phpinfo();
?>
Then visit yourdomain.com/phpinfo.php and press Ctrl + F to search for “json”.
If you see a section like:
json support => enabled
✅ You’re good to go!
Step 4: Contact Hosting Support (If the Error Persists)
If you can’t enable the extension manually or don’t see it listed:
- Contact your hosting support team.
- Ask them to enable the PHP JSON extension for your account.
They can activate it from the server backend (e.g., WHM or EasyApache).
🧠 Bonus Tip: Switch Hosting if Needed
Some low-end shared hosting providers limit PHP modules.
If your host doesn’t support JSON or updated PHP versions, it’s time to switch.
👉 Consider providers like Hostyzen, Namecheap, or Hostinger, which include full PHP extension support.
✅ Final Words
The “WordPress requires the JSON PHP extension” error might look technical, but it’s simply a missing module.
With a few clicks in your cPanel, or a quick message to your host, you can fix it instantly and get your WordPress site running smoothly again.
🔍 Quick Summary
| Problem | Solution |
|---|---|
| JSON PHP extension missing | Enable it from cPanel > Select PHP Version |
| Old PHP version | Upgrade to PHP 7.4 or newer |
| Shared hosting limitation | Ask host to enable or migrate to better hosting |