Suddenly Error 404 on My Wordpress

#1
Dear Friend,

I got a problem error 404 on one of my WordPress sites. I need suggestion to figure it out.

Environment:
- VPS Ubuntu 18.04 Bionic
- OpenLiteSpeed Webserver 1.7.2
- 10 WordPress Sites
- Script handle: Lsphp 7.4
- Age: 12 months VPS

Problem:
- 1 site suddenly has an error 404

Investigations:
- Litespeed plugin suddenly disappear from all my WordPress sites.

What was I do
- Reinstall LiteSpeed plugin
- Compare all configurations with the same successful site.
- Change .htaccess
- Deactivate all plugins on my error site

Result
- 9 was successfully working, only 1 got an error 404 not found

Last setting .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

I was looking for a solution on this forum and googling for it. Still got no result.
If you guys have any idea for my error would be great.

Best Regard
Harry
 
#3
Hi Cold,

Nothing much information on the error log, and I didn't change the document root.
The static file can be accessible, such as an image file. But the articles file got an error 404.

[STDERR] PHP Fatal error: Uncaught Error: Call to undefined function -> index theme function.

Change those themes still got an error. I can log on my admin dashboard anyway.

Any suggestion?

Best Regard
Harry
 
#5
Hi Cold,

I found some errors:

[STDERR] PHP Fatal error: Out of memory (allocated 6291456) (tried to allocate 32768 bytes) in /usr/local/lsws/xxxxx/public_html/wp-content/plugins/woocommerce/includes/class-wc-breadcrumb.php on line 321
[Module:Cache] createEntry failed, may due to no permission to write file or file is updating.
No request delivery notification has been received from LSAPI application, possible dead lock.

Now, I have to deactivate all my plugins and only wordpress. Still investigating those errors.
 
#6
Solved!

[STDERR] PHP Warning: fileperms(): stat failed for /usr/local/lsws/xxxx/public_html/index.php in /usr/local/lsws/xxxx/public_html/wp-admin/includes/file.php on line 1961

Because of:
  1. File permissions suddenly change
  2. Missing 1 file

Solutions:
  1. change file permission to 644
  2. Added missing file from fresh WordPress installer
  3. Added wordfence for additional protection
Command line:
find /usr/local/lsws/xxxx/public_html/ -type f -exec chown -R nobody {} \;
find /usr/local/lsws/xxxx/public_html/ -type d -exec chown -R nobody {} \;
find /usr/local/lsws/xxxx/public_html/ -type f -exec chmod 644 {} \;
find /usr/local/lsws/xxxx/public_html/ -type d -exec chmod 755 {} \;
 
Top