I think I’m going crazy.
I’ve tried all the problems I’ve seen on the internet but I can’t solve them.
I installed wordpress but I can’t make any changes to any page. It’s like wordpress can’t access the server files.
REST API gives this error:
The REST API encountered an error
Performance
The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.
When testing the REST API, an error was encountered:
REST API Endpoint: https://borasozer.com/wp-json/wp/v2/types/post?context=edit
REST API Response: (http_request_failed) stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000410:SSL routines::sslv3 alert handshake failure stream_socket_client(): Failed to enable crypto stream_socket_client(): Unable to connect to ssl://borasozer.com:443 (Unknown error)
I also get this error when I make changes to the page and try to update it:
Updating failed. The response is not a valid JSON response.
Even if I changed the permission of all WordPress files to 777, it did not change. I may have made a mistake in the HTTPS change when setting SSL, but I couldn’t solve it.
I tried the solutions related to .htaccess but I couldn’t get out of it. Saving the Permalink section again and again did not create a solution. I guess it can’t write to .htacces in any way.
Also, even though my pages have permalinks, none of them appear on the website except the homepage. I cannot change the main page nor the others.
Can someone help me, thanks…
2
Answers
First of all run the following command to install PHP dependencies required to run the WordPress properly. It’ll solve many errors.
Follow the following steps one by one:
change your directory
cd /etc/apache2/sites-available
There are two files here you have to edit.
First File: your_website.com.conf (replace your_website.com with the your file name)
(Make sure you have the following lines just below the DocumentRoot line. If not please add them)
Note: The line after the word directory should be same as the line after DocumentRoot
Second File:your_website.com-le-ssl.conf
(Make sure you have the following lines just below the DocumentRoot line. If not please add them)
Note: The line after the word directory should be same as the line after DocumentRoot
Execute the following commands to re-enable the edited files
sudo a2ensite your_website.com.conf
sudo a2ensite your_website.com-le-ssl.conf
Execute the following commands to restart apache service
sudo systemctl restart apache2
There you go! It should solve your this error completely now.
Not working and my server is litespeed.