[Resolved] Latest wordpress plugin can not find wordpress outside of root?

Status
Not open for further replies.

jkeegan

Active Member
#1
I have had success with the latest wordpress Litespeed cache plugin on sites that have Wordpress installed into the root, but when I try it on sites that have WordPress installed inside a directory like /wordpress from the root, Litespeed plugin can not find or read from or write to htaccess...

Bug?
 

Pong

Administrator
Staff member
#2
"root" you means virtual host document root, right?
WordPress can be installed to document root, or sub directory of document root without any problem. We have a lab setup under /blog/.
 

jkeegan

Active Member
#3
Yes, I mean the document root... None of my sites installed into a subdirectory off the document root can read or write settings into the .htaccess files using the latest version of Litespeed server and WordPress plugin...
 

KevinFwu

Administrator
Staff member
#4
What errors are you seeing? Does the PHP user have permission to write to that directory (if PHP is set to run as a specific user)?

Also, how did you install the plugin?
 

jkeegan

Active Member
#5
PHP user has permission to write to directory, all other WordPress operations requiring that like plugin and theme updates work successfully. Plugin was installed via the Add New plugin button in WP itself (ie via control panel not FTP so again PHP has permission on these folders.

Errors I see are attached... In LiteSpeed Cache Settings v1.0.8.1 it shows Error getting current rules: .htaccess file does not exist or is not readable." when .htaccess file clearly exists and WP is having no issue reading or writing to it...
 

Attachments

KevinFwu

Administrator
Staff member
#6
Do you have any rules blocking access to the .htaccess file?

If not, could you pm me access to your server and wp admin? Will have to figure out why that is occurring.
 

KevinFwu

Administrator
Staff member
#7
To anyone that comes across this forum post, the explanation of the problem:

In versions 1.0.8.1 and prior (roughly since 1.0.7), in a subdirectory install, the plugin expects two .htaccess files.

For example, if WordPress is installed in public_html/wordpress and is accessed via example.com instead of example.com/wordpress/, the two files expected are:
public_html/.htaccess
public_html/wordpress/.htaccess

So the error message was correct in this case. The second .htaccess file was not there. However, the error message was not very clear, so I will update the error message in the next update.

EDIT: After discussion with jkeegan, instead of adding an error message for if the subdirectory .htaccess file exists, I will just write to the document root .htaccess file. This change will be done for the next version.
 
Last edited:
Status
Not open for further replies.
Top