wordpress erratic cache-like behavior - wordpress

I am having a really weird issue with one of my clients' WP installations.
Site behaves as if there was some kind of caching active. And it's the most noticeable in wp-admin area.
When I open plugin config page, what I see there does not correspond with what's really happening: wrong plugins are marked as active and some, that are active are not even visible (as if not even installed).
Hitting F5 usually helps and correct information is displayed, but when I go back to the dashboard (or any other page) and return to the plugin management, again wrong information is shown. If I click to enable/disable any of the present plugins, page is either not updating at all or is loading incorrect statuses.
What I have done so far to try to solve this:
disabled all of the plugins
switched to the "stock" theme (Twenty Seventeen)
changed the language to EN (oddily enough, when toggling plugins, language switched back to the previous one)
checked nginx configs for any cache-related settings and disabled those
checked for presence of Varnish / Redis etc (not present)
disabled OPcache
checked whether the site is served via CDN (is not)
checked if wp-config.php is containing settings like define('WP_CACHE', true); (it does, but commented out)
switched PHP versions
changed PHP workers
disabled nginx to Apache proxying
wiped the "plugin" directory clean
Nothing seems to be helping.
Other websites, hosted on that server, do not experience any issues. Has anyone experienced anything like that? Any ideas how to fix it?
Here you can see "live" what I mean:

In case anyone else had issues like I did, here is what I did to finally solve it:
wiped all server-side cache
wiped wp cache files
uninstalled all the plugins
uninstalled the style
reinstalled WP
rebuild all user configs / permissions etc
reinstalled style
reinstalled all the plugins
ta-daaa!
it's working now. What a mess this was... o_O

Related

WordPress site impacted with redirect injection

I have a website that is running on an AWS server using the Bitnami Nginx and WordPress image.
https://www.athleticclubhk.com/
Recently it got all our ads on Google stopped due to malicious content. Oddly this time, its trickier then your standard malware of infected files. When visiting the site incognito, the first and only the first link click gets redirected using the following code:
window.location.replace("https://cartoonmines.com/scount");window.location.href = "https://cartoonmines.com/scount";
This is being injected on any link, however, upon investigating the loaded code on inspect its not injecting it into the page.
I've tried to hunt down the theme, plugins, core files and found nothing!
I replaced and reinstalled WordPress core files, deactivated all plugins and even swapped the theme - the problem is still there. I can't find any hidden .htaccess file in the entire root directory.
I even used GREP to try to look for anything fishy (any clues here that someone can help with?) nothing so far.
The site is still impacted with this so you can easily load the link ~ i do use malwarebytes to keep myself protected, incase you are opening this directly.
Can anyone help?
The redirection code is implanted to /wp-includes/js/wp-emoji-release.min.js.
How to confirm:
watch the cookies when clicking internal page, a new cookie is being set for tracking first clicks, named ht_rr
save complete webpage locally and try to load it, and check in Chrome dev tools, you'll see that in Console tab it complains about this Javascript file attempting to set the aforementioned cookie
While a temporary resolution of deleting the file will fix things for some time...
There's no excuse for not setting up a proper server stack. Bitnami or other "great stacks" won't cut it security-wise. They exist for "fast", but no "quality" setup, and of course, it's never going to be secure.
The file got created somehow / had write privileges. This indicates a problem with the setup most of the time. Unless you're using some nulled plugins or plugins from bad sources.
Once again, since the website was essentially "pwned", deleting the Javascript file does not mean complete disinfection. To preserve things in a secure state, I would recommend setting things on a clean server environment with strict PHP-FPM permissions aka "lockdown" chmod, and look for write errors to look for infected PHP files.
Check out some guides on the matter of secure NGINX/PHP-FPM setup:
NGINX and PHP-FPM. What my permissions should be?
Best practice secure NGINX configuration for WordPress
NGINX Security Headers, the right way
Just had the same problem and it was Zend Font Plugin, the same that some people mentioned before.
Installed Wordfence and this came out. Deleted the plugin and now the site is working perfectly.
Disable plugins and check again.
Change the database username and password.
Ask the hosting manager to check the host.

WordPress Pretty Permalinks

Pretty permalinks are no longer working, I've tried all the obvious things;
Re-save permalinks
Delete and regenerate HTAccess
Disable all plugins
Restarted Apache
Cleared browser cache (although this issue happens for everyone)
Checked the tables via PHPMyAdmin
Enabled WP debugging, nothing is showing
The pages are there and work fine if using plain links.
This is the only site that has the issue, other sites running on the same dev server are fine.
The issue is only apparent in recent versions of the database, so I do have a working version that could be used for debugging, but I'm unsure what to be looking for.
Any help would be greatly received!
This was caused by a CPT for which rewrites did work before.
Disable the CPT rewrite option and now things work.

Wordpress Dashboard broken, displays “flashbacks” of comments/plugins/updates

I’m using the latest version of Wordpress (4.7.4).
I have something very weird going on in my Dashboard. Not sure when this started.
Can’t say for sure it started with the latest version of Wordpress or not.
My Dashboard became completely useless.
It’s like it’s showing me a flashback of a Dashboard from a few days or hours ago:
Comments I’ve deleted in the Dashboard (hitting “trash”) are suddenly back there, awaiting my moderation.
Plugins I’ve deactivated or even deleted are all back there and according to Dashboard still running (while in my FTP folder they’re certainly gone).
The plugin page cannot be trusted anymore as it shows some plugins are activated that aren’t and vice versa. I have to check on my actual website to confirm which ones are running.
Updates aren’t shown correctly. Once I’ve updated a plugin, a few minutes later it shows me again that there’s a new update.
As you can tell it’s all pretty much the same phenomenon.
It’s as if I’m seeing an older version of my Dashboard.
Not sure what else is broken.
The only other thing I noticed is that even on my actual blog I still see a comment. Blog post says “1 comment”, but the actual comment doesn’t show up.
At first, this all sounds like a “cache problem”.
But I’ve already turned off all caching:
No caching plugin installed
Turned off server caching via htaccess
Disabled leverage browser caching
Emptied my own browser cache
Other things I tested:
Turn off all plugins.
Switch to the standard Wordpress theme “Twenty Twelve”
I tried WP_DEBUG, but nothing related shows up.
I researched the internet, but nobody has described a similar problem, so I suppose this is not a common Wordpress issue.
The issue remains.
Unfortunately I’m not a developer and don’t know too much about the Wordpress codex etc.
But to me it sounds that the mistake is definitely not in the plugin or theme folder.
The problem is that I’ve reached the point where I really cannot turn off plugins via Dashboard properly anymore. It’s so annyoing!
My questions are:
Is it safe to assume that this is related to the Wordpress core
files?
What files exactly are in “charge of” the Dashboard?
Should I just try to re-download the newest Wordpress version and replace a few files (if so which ones)?
Should I do a clean Wordpress re-install or would that be too drastic?
Any other suggestions?
EDIT:
Additionally I tried now:
I manually downloaded the newest version of Wordpress and did just as
described on the Wordpress.org website. I manually replaced wp-admin,
wp-include folders and all root files. The issue remains...
The way my Dashboard is right now, I really can’t use it.
Please advice!
I contacted my host service again.
They just gave me the same line to insert into my .htaccess file and I told them I already tried it and it didn't work.
I then showed them my .htaccess file and they deleted the whole part that concerned their server caching.
Now server caching is completely off and everything works again.
Still not sure why this previously never caused issues.
In the end, it had nothing to do with Wordpress.
I hope this answer will help people who run into similar problems.

Apache/WordPress Cache Not Refreshing

So I was trying out a caching plugin on my WP site. I had installed it after my home page never changed (forever static). Uninstalled the plugin, tried moving the WP files to another sub-domain, and my frontpage still was static. Even on another sub-domain. This only had happened when I changed some .htaccess settings for it, but I had already reverted these.
I've tried emptying my local cache, different computers, etc. Page is still static. Does anyone know what is going on?

Wordpress admin unresponsive in local dev environment

My local dev environment consists of MAMP, Chrome and Firefox. In certain places in the admin any of my wordpress installs are unreponsive, even with a completely fresh install with no plugins or themes enabled.
What I mean is that once I click a button like "save menu" under appearance->menus, or when I for example try to add three pages to a menu, an request is fired without response. One is an ajax request (the add to Menu Button that is) and another one is just a normal post request (save menu), both actions lead to no response.
I tried to
Upgrade MAMP
INcrease my memory_limit in php.ini
And I of course also searched the Internet like crazy for somebody who had a similar problem, to no avail.
Anybody having/had a similar issue?
Turned out this had to do with too much messing around with packages on OSX and nothing with php apache or wordpress for that matter. It behaved quite strangely.

Resources