How do I develop WordPress plugins locally and conveniently update the files on my server?

April 19, 2018 696 views
WordPress PHP Ubuntu 16.04

Hi, I’m completely new to this and have no idea what I’m doing at all. I have set up a WordPress droplet with one-click WordPress app on Ubuntu 16.0.4. It’s a nice experience so far, I’m meddling with themes and stuff.

Now I’m developing a WordPress plug-in but I find myself zipping up the file and uploading it with every change. Is there a way I could more conveniently push my changes to Digital Ocean? It doesn’t have to be as convenient as heroku, but zipping it everytime and uploading it through the WordPress admin panel doesn’t feel like the way to do things either.

I have no idea how to approach everything, I’m also using a Windows 7 computer. And I other than using putty.exe to activate the droplet, I have no idea how anything works. Can someone point me in the way to do things? Digital Ocean seems to be a really good service and I would really love to be a long term user.


1 Answer
ryanpq MOD April 19, 2018
Accepted Answer

To get started you should be able to identify the location of your zipped files once WordPress installs them (this should be wp-content/plugins under your web root which defaults to /var/www/html/).

You can use a client like Filezilla to upload your files when changes are made. Configure it with the same information used for your SSH connection, selecting port 22 and SFTP as the protocol. This will start you out in /root so you’ll need to change up one directory to / and then navigate to /var/www/html/wp-content/plugins

This will do for most minor changes as you make improvements but I would recommend the zip file method if you need to distribute your plugin to anyone else or if you make changes to the name or other main details of the plugin.

Later on, you can look into using version control on GitHub to better manage your code while building plugins.

  • Thank you for the Filezilla suggestion! I know how to use git, and since this is a tiny plug-in that I don’t intend on making public, I would prefer to create a repository on my computer. If I could then have an easy method of updating the plugin straight from my computer then I would be set. Is that possible?

Have another answer? Share your knowledge.