Wordpress/Yoast(?) Permalink Issues

#1
Hello,

We have a new site setup, using Digital Ocean's one click install for OpenLiteSpeed(1.5.7)/Wordpress(5.2.4): https://marketplace.digitalocean.com/apps/openlitespeed-wordpress

After following all setup instructions the site was running well. Then we deleted all existing plugins (except LiteSpeed Cache 2.9.8.7), and installed two plugins, and a theme:
GP Premium (1.8.3)
Yoast SEO Premium (12.3)
Theme: GeneratePress

After doing so we were no longer able to update/publish/visit posts or pages. The homepage still appeared fine.
We also would receive 404 errors in the console for files in the path:
Code:
/wp-json/wp/v2/*
(these errors appeared on editor pages).

I have tried restarting OpenLiteSpeed, and changing the permalink structure.
The site actually works with the plain URL structure:
Code:
https://example.com/?p=123
Or when you add index.php to the path:
Code:
https://example.com/index.php/%category%/%postname%/
I have looked at all sorts of other people with these types of errors and none of their solutions are helping me in any way. It really looks like the .htaccess file is not being processed by OpenLiteSpeed, or path override is not working.

We have another site with all the same plugins, and themes but the only difference is that OpenLiteSpeed is version 1.4.49.
 

David

Active Member
#2
The default page is index.php or index.html when a url does not contain a filename.
A url such as http://......./abc/, if there is not index file in ..../abc/, it will shows 404 error.
You can set the rewrite or use a index file to fix this issue.
 
#3
The default page is index.php or index.html when a url does not contain a filename.
A url such as http://......./abc/, if there is not index file in ..../abc/, it will shows 404 error.
You can set the rewrite or use a index file to fix this issue.
Adding a rewrite to the htaccess file did not work. I am already using the default htaccess for wordpress so it shouldn't be an issue. It should remove the necessity for index.php in the URL

Code:
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]

### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###

### marker LOGIN COOKIE start ###
RewriteRule .? - [E="Cache-Vary:wp-postpass_b7c42afe0a3892ff24b9060a5cb7fc3a"]
### marker LOGIN COOKIE end ###

### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###

### marker WEBP start ###
RewriteCond %{HTTP_ACCEPT} "image/webp" [or]
RewriteCond %{HTTP_USER_AGENT} "Page Speed"
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
### marker WEBP end ###

</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###

## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE

### Forcing HTTPS rule start       
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
### Forcing HTTPS rule end
            
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
 

David

Active Member
#4
You can update the error log level to DEBUG/HIGH and reproduce the 404 case, then the log will tell the reason, or you can send us the log of that request.
 
Top