Hey sorry for the delay, did you perform a search for any keywords in dtabase?
In PHPMyAdmin (or Adminer if you’re using that) press the ‘search’ function and look for spam keywords like this:
casino
pharmacy
viagra
rolex
cialis
Or whatever keywords relate to the spam you are grappling with.
If you see any tables which include that content you might have a winner. If you find it, edit those tables and delete the spam manually or revert back to an older database backup if you have one.
I also find this is very helpful to search for when dealing with database spam:
left:-
This will find many hidden links if any are present.
Now, it is possible that this infection is not located in the DB – I might also suggest you try looking at the content of your .htaccess file. It should look like this:
https://codex.www.ads-software.com/htaccess
If you see any references to other domains in your .htaccess or anything that is referencing a file other than index.php that might be the issue. Try replacing it with default .htaccess. (for example, if .htaccess references common.php instead of index.php then it is likely that common.php is the malicious file)
If any of these solutions don’t work try replacing your core WordPress files with fresh copies. If that doesn’t work, try temporarily disabling all your plugins and try those links again to see if they work – this is a way to determine if it is your plugins. Similarily you can do this with themes – change to fresh copy of twentyfourteen theme and try the link again.
Once you get the issue sorted, though, don’t forget to change all your passwords ??
Let me know if you continue to experience problems with this and we’ll try to get to the bottom of it.
These might help: https://blog.sucuri.net/?s=spam