How to Fix JSON PHP Extension Errors in WordPress
**Description:**A step-by-step guide for shared hosting customers to diagnose and resolve PHP extension configuration issues (specifically missing or disabled json
) that prevent WordPress installation.Applies to: Eco Web Hosting shared hosting with DirectAdmin and CloudLinux's "Select PHP Version" tool.
Why Does This Happen?
WordPress (and many plugins) require the json
PHP extension to function. On shared hosting, if this extension is not enabled, you may see errors such as:
- "Your server is missing the JSON extension."
- "Error: PHP Extension 'json' is not loaded."
- "WordPress requires the JSON PHP extension."
This can prevent installation or break existing sites.
Step 1: Confirm the Error
Common places to see this error:
- During WordPress install via Softaculous or manual upload
- On your WordPress dashboard (Site Health > Info or Status)
- In plugin installation screens
- As a visible error on your website
If you see an error mentioning "missing JSON PHP extension" or similar, continue below.
Step 2: Log in to Your Hosting Control Panel
- Go to your Eco Web Hosting Client Area and log in.
- From the dashboard, access your Services - Manage Hosting.
Step 3: Open "Select PHP Version"
- In DirectAdmin, look for Select PHP Version (sometimes labelled "PHP Selector" or under an "Advanced Features" section).
- Click to open the tool. You will see your current PHP version and a list of available extensions.
Step 4: Enable the JSON Extension
-
Locate the JSON Extension:
- Find
json
in the list of PHP extensions. - It should appear as a checkbox alongside other extensions.
- Find
-
Enable the Extension:
- If the box next to
json
is not ticked, check it to enable. - Scroll down and click Save (if required).
> Example: > >
> [x] json > [ ] soap > [x] mysqli >
- If the box next to
-
Wait a few seconds for the changes to apply. The page may reload, or you may see a confirmation.
Step 5: Verify the Fix
- Refresh your website or reinstall WordPress.
- Check WordPress Site Health (Tools > Site Health > Info) or retry your installation.
- The error about the missing JSON extension should be resolved.
Troubleshooting
JSON Extension Still Missing?
- **Double-check the PHP Version:**Make sure you’re enabling
json
for the active PHP version for your domain. If you have multiple domains or subdomains, check each one’s PHP version via DirectAdmin. - **Switch PHP Versions:**Sometimes switching to a different (supported) PHP version and then back again can refresh extension settings.
- **Clear Your Cache:**Clear your browser cache and any website cache plugins after making changes.
Practical Example: Enabling JSON for PHP 8.1
- In Select PHP Version, make sure PHP 8.1 is selected.
- Tick the box for
json
. - Click Save.
- Wait for confirmation and try your WordPress install again.
What If You Still Need Help?
If the error persists after following these steps:
- Double-check that you are editing the correct domain and PHP version.
- Note any specific error messages or screenshots.
**If you’re still experiencing issues, please submit a support ticket via your Eco Web Hosting Client Area.**Include:
- The domain name affected
- The error message(s) you’re seeing
- Steps you have already tried
Additional Tips
- The steps above also apply to enabling other required PHP extensions (e.g.,
mysqli
,curl
,mbstring
). - Use the phpinfo() tool in DirectAdmin to confirm enabled extensions if needed.
Related Articles:
If you have any questions or run into issues, our support team is happy to help via support ticket!