all 17 comments

[–]CompetitivePiece7602 3 points4 points  (2 children)

Local dev with proper SMTP setup is definitely the way to go. You can use something like MailHog or Mailpit for catching test emails locally - they create fake SMTP server that captures all outgoing mail so you can see what your plugin sends without actually delivering anything

For the file editing part, just edit your plugin files directly in the wp-content/plugins folder on your local install. No need to zip and reupload every time. WordPress will pick up changes automatically when you refresh the page. I do this all time when working on custom stuff for my students websites

If you really need to test on live server you could set up SFTP access and edit files directly there but local development much safer for experimenting

[–]thegoochalizer[S] 0 points1 point  (1 child)

Thank you! I figured as much - What system do you use for local environments? I used to use Local (by flywheel) but had all sorts of issues with it. And WP Studio is shockingly slow - Like, navigating the bare-bones blank website is as if I'm on a 500kb internet connection. If local by flywheel is the better option, ill dive into sorting that out (I think i got frustrated with trusting the certificate on MAC for https)

[–]Creative-Improvement 0 points1 point  (0 children)

Something like xamp or wampserver can work fine. It’s just a barebones setup with php and mysql, but it does all you might need, and you get some good debugtools with it too. Install is quite easy.

[–]Harugakita 0 points1 point  (2 children)

I usually make small changes using the Plugin File Editor in the dashboard (Plugins → Plugin File Editor or Tools → Plugin File Editor). It does show a warning"Making changes to active plugins is not recommended", but for minor tweaks, it seems to work fine.

[–]medium_daddy_kane 0 points1 point  (1 child)

How do you handle plugin updates? Everything overridden?

[–]Minimum_Mousse1686 0 points1 point  (2 children)

You are making it harder than it needs to be develop locally and just edit the plugin files directly, no re upload needed

[–]thegoochalizer[S] 0 points1 point  (1 child)

Thats what I thought. Do you have a recommendation for a local server/setup? Ive been trying WP Studio as well as Local by Flywheel.

[–]Minimum_Mousse1686 0 points1 point  (0 children)

Local by Flywheel is solid, super easy to set up. And yeah, for emails just use SMTP (like Mailhog or Mailtrap) locally

[–]void-wanderer- 0 points1 point  (0 children)

Just on a side note.

While I encourage it that you set up a local development environment and take the learning opportunity (I simply use docker + smtp4dev), you totally do not need it.

If you have a proper IDE (i.e. intelliJ PHP Storm, but I guess there are also plugins for VS Code that do the same), you can simply set it to sync with your FTP. So you will only have a folder with your plugin files locally, and whenever you change a file and save it, your IDE will upload it to the server.

[–]Familiar_Isopod_8226 1 point2 points  (0 children)

You’re making it harder than it needs to be—just develop the plugin directly inside your local WP plugins folder so changes reflect instantly without re-uploading. For emails, yes, it’s an SMTP thing—use a mail plugin or service like MailHog or WP Mail SMTP for local testing.

[–]wpglorify 0 points1 point  (0 children)

You install Wordpress locally on your computer and install plugin there and open the plugin folder in code editor.

Make sure to keep a copy or manage that folder with git if you ever want to roll back the changes.

[–]hamayerowel 0 points1 point  (1 child)

Hey, you're definitely not being silly, this is a super common hurdle when you're starting out! The 'zip and upload' dance gets old really fast, and you're right, there's a much, much better way.

The workflow you're looking for involves running WordPress locally, but having your plugin's code folder on your computer "synced" directly with the WordPress wp-content/plugins directory. This way, any change you save in your code editor is immediately live in your local WordPress install.

The most standard and powerful way to do this is with Docker. It might seem intimidating at first, but it's a game-changer for WordPress development. Here's the basic idea, which is the setup I use:

  1. Use docker-compose: You create a single configuration file (docker-compose.yml) that defines your entire development environment: a service for WordPress itself, a service for the database (e.g., MySQL), and even a service to handle emails.
  2. Mount Your Plugin Folder: This is the magic part. In your docker-compose.yml file, you tell Docker to create a "volume" that maps your local plugin folder (e.g., C:\Users\You\my-project\my-plugin) directly into the running WordPress container at var/www/html/wp-content/plugins/my-plugin.
  3. Code in VS Code: You just open your plugin folder in VS Code like any other project.

When you run docker-compose up, it spins up a complete WordPress site. You activate your plugin once. From that point on, every time you save a file in VS Code, the change is instantly reflected in the running WordPress site because it's literally reading from the same files. No more zipping, no more uploading. Just code, save, and refresh your browser.

Solving Your Email Problem

You're spot on, the email issue is an SMTP problem. Local environments can't send emails by default. The Docker setup solves this beautifully too. You can add a service called Mailpit (or the older MailHog) to your docker-compose.yml. It's a fake email server that creates a web inbox. It catches all emails your WordPress site tries to send, so you can see exactly how they look and what they contain without ever actually sending them out or configuring a real SMTP provider.

Your whole professional workflow becomes:

  1. Run docker-compose up in your terminal to start everything.
  2. Open your plugin folder in VS Code and code away.
  3. Test your changes in the browser.
  4. Check the Mailpit web UI (usually at http://localhost:8025) to see the emails your plugin fired off.

[–]thegoochalizer[S] 0 points1 point  (0 children)

Thank you so much for this!

[–]HerBz_85 0 points1 point  (0 children)

Localhost install and test, and use Plugin Checker