I made a simple plugin with AI’s help that I use locally, so I don’t have to log in as administrator every time I reset a WordPress site to run tests. The initial plugin code had the credentials hard-coded, but before sharing it, I changed it to fetch the first admin user from the database.

You can access the plugin code in my GItHub wp-tools/auto-login/.

I won’t add this to the official plugin repository since it could be a security risk if someone installs it on a production site, even with a safeguard to check if WP_ENVIRONMENT_TYPE is set to local.

Happy testing!

🤖 Clarification on the use of Artificial Intelligence in this content

  • 📝 AI used for: text correction;
  • 🧠 Model: ChatGPT 4.1;
  • 🧐 Human Reviewed: Yes.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *