Solutions · WordPress
WordPress: a strange script in post 42
With example names (mi-app, /ruta/al/proyecto). In GoTool, in 🛡 Security, this page shows your project's: your container, your compose file, your WordPress folder.
What's happening
The content of post 42 carries a script from another website, obfuscated code or an invisible iframe.
Why it matters
It's what gets injected into posts to send visitors to another website or mine with their browser.
What to do
- Look at its content (or open it in the WordPress editor, in code mode):
wp post get 42 --field=post_content --path=/ruta/al/wordpress - If nobody on the team put it there, remove it and save; and look for other posts with the same thing:
wp post list --post_type=any --s='<script' --fields=ID,post_title --path=/ruta/al/wordpress - Find out how they got in: plugins with known flaws, the administrators' passwords, and the rest of this project's critical issues in 🛡.
- If WordPress runs in a container, run the wp commands inside it: docker compose exec <service> wp …
How to know it's fixed
- gotool checks the WordPress again on its next pass: once it's gone, it stops showing up.
If you can't do it that way
- If it's yours and it's like that on purpose, mark it as closed with its reason in the project's 🛡: it stops warning (and warns again if it changes).
More
In GoTool, the file with the issue (the Dockerfile, the compose file) is also shown with the solution next to it, and the question for Claude comes ready, with your project's details and without your keys, to paste into your claude.ai.