

Now let’s look at how we can automate this process, increase efficiency, and avoid remembering each Terminal script every time we need to release a new plugin version. I have showed one way to compress a folder that later can be used as a plugin inside WordPress and your user’s will not be asking various questions about why is the plugin so heavy or what does the _MACOSX folder do inside the plugin. To see and validate the contents of your archive you can use the following script. Now your compressed file should be ready. Compress the plugin folder (in my example name of the folder is cartbounty-pro) and exclude unnecessary files by running this script. Open Terminal and enter the following line to navigate to the place where you have the folder that must be compressed. Let’s assume that we have a folder on our computer called container_folder where our plugin folder called cartbounty-pro resides.ġ. Compress excluding hidden filesĭigging through the internet I came across a script that can be run inside Terminal to compress a folder with its contents and at the same time exclude unnecessary files or folders.
:max_bytes(150000):strip_icc()/MACTerm-a22a7c249398406b89c5a88924057b3c.jpg)
Including these hidden folders can make your plugin ten times heavier. zip file since previous versions and commits should remain in your preferred version control systems. svn inside your plugin folder which you would like to leave out of the resulting. In addition, you may also have hidden files like. Default Compress folder context menu option on Mac OS These are completely useless to WordPress end-users and serve only to create clutter in your beautifully structured plugin as well as take additional space. If you have ever used default Mac compression feature from the context menu, the compressed archive that will be created will include additional Mac system files and folders like. Automating routine processes like creating a WordPress plugin archive that does not hold any unnecessary files can save a lot of time. If you are a WordPress plugin developer like me, you know the value of saving time and being efficient.
