The response is not a valid JSON response.

Hi I hope you all are doing well.

Actually I've started using Linode recently (Debian9 - WP) and with my first post I'm facing an issue (it says - The response is not a valid JSON response.). I've searched solution to this problem and tried disabling plugins, changing theme, using site health plugin to see if there's anything I could do. Nothing really worked.

The Site Health plugin shows:

The WordPress Hosting Team maintains a list of those modules, both recommended and required, in the team handbook (opens in a new tab).

Warning The optional module, bcmath, is not installed, or has been disabled.
Error The required module, mbstring, is not installed, or has been disabled.

If anyone was successful to resolve this issue any other way, please share. Thanks.

4 Replies

I ran into the same issue earlier today. I tried installing the two php modules as well and couldn't get a page to save. I searched Wordpress and finally found a solution, though maybe less than ideal, it works. You need to switch your Permalink settings to Plain, and you should be able to create a page.

I like to use the month and page title for my permalinks. If I find a solution that will allow me to use them, I will make sure to update this page.

It looks like I was able to figure it out. I'm outlining the steps I took below.

Step 1 - enable mode rewrite

Enter the following command

sudo a2enmod rewrite

sudo service apache2 restart

Step 2 - Edit apache2.conf file

Use your favorite text editor to edit the file. I use nano.

sudo nano /etc/apache2/apache2.conf

Then edit the following lines to AllowOverride ALL

<Directory />
    Options FollowSymLinks
    AllowOverride All

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

Step 3 - Edit the vhost file - /etc/apache2/sites-available/wordpress.conf

<files xmlrpc.php>
  order allow,deny
  allow from all
</files>

You will need to change this back to it's original setting after step 5

Step 4 - Restart apache

sudo service apache2 restart

Step 5 - Choose the permalink settings you want in wp-admin.Make sure to create a page and it make sure the permalinks work.

Step 6 - Reset your vHost file to its original setting

<files xmlrpc.php>
  order allow,deny
  deny from all
</files>

Step 7 - Restart Apache

sudo service apache2 restart

@asilverman writes:

Edit the following section in the vHost file to allow from all.

<files xmlrpc.php>
  order allow,deny
  allow from all
</files>

This is very dangerous…it gives all browsers/web clients access to xmlrpc.php. Unless you have some kind of (strict) enforcement on your site about who can make requests via xmlrpc.php, you've just opened a giant security hole.

-- sw

Hey @stevewi,

You're correct, thanks for pointing this out! It looks like the forum posts I found didn't read all the way through. I did some testing, and it seems like it's only necessary to change the vHost file while selecting the permalink, then we can change it back.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct