Problem with permalinks in wordpress - Postname doesnt work correctly on some domains

31 Views Asked by At

i have vps hosting on Ubuntu 23.04 and apache server.

I have weird problem. I host in the same way 5 domains. I created directories, create virtual hosts, databases and install wordpress on 5 domains.

On all domains i changed permalinks to postname. On 3 domains all works correctly. But on 2 of them, i cant post articles. When i tried to post article i have info: Failed to publish. The response is not a valid JSON response.

I check in tools wordpress - site health and in these 2 problematic domains i have this info: REST API is one of the ways WordPress and other applications communicate with the server. An example of using this mechanism is the block editor screen, which uses the REST API to display and save entries and pages. When testing the REST API, an unexpected result was returned: REST API address: https://site-name/wp-json/wp/v2/types/post?context=edit REST API response: (404) Not Found

When i changed permalinks to plain, all works correctly.

But i need to have permalinks postname.

All settings and cofigurations for the domains are the same i think. I look at htaccess, i have default themes and i dont have any plugins.

I changed htaccess to default, chceck sites-available and sites-enabled files in apache,

0

There are 0 best solutions below