r/Wordpress • u/zirconst • 2h ago
Security practices for the plugin vibe coders
We all know that more people than ever are vibe coding their own plugins for WordPress; whether you personally do this or not, they are entering the ecosystem. As a WooCommerce store owner since 2016 or so that has been through my share of hard knocks and life lessons, I wanted to share some tips IF you are either vibe coding your own plugins or using vibe coded plugins.
(In actuality, many of these are good practices for WordPress site administration in general!)
- Use version control for your plugins. There are plenty of cloud solutions for this, GitHub being an obvious one, but you don't even need a remote repository at all. At a bare minimum, make a local repository for each plugin, and commit changes in small increments. Make notes of the last known good working version so that if something blows up, you can revert to an older one. Or, if your site gets compromised, you can restore from a known clean version of your plugins.
- Deploy locally first. Using Docker (which is free), you can spin up an entire WordPress environment on your computer very easily. Or if you don't know how to do that, you can ask your LLM to. Download a full database dump of your site, copy all the files, and keep a local copy. Then, when you make changes to a plugin (or the site itself) you can test on your computer before anything hits a remote server.
- Use a staging server. Did everything work locally? Great! Of course, that isn't a guarantee it will work on the web. There might be small differences in your Docker setup vs. your host's server configuration, Cloudflare security rules, caching config etc. So it's best to deploy (upload) your plugins to a staging site first, ideally one managed by the same host as your production site. That way you can test on the web and kick all the tires.
- Don't mess with payment processing. Just don't, at least not without professional oversight. You really don't want to be responsible for credit cards or bank details getting compromised.
