Creating plugin with bash
Hey Guys,
I'm completely new in cPanel/WHM plugin creation. I wanted to create a plugin and I'm not really interested in learning PHP or perl at this point. So I wanted to code the plugin in bash. Is that possible?
I'm simply trying to achieve a site migration plugin. Any guidance would be deeply appreciated.
Best regards
-
Hello, Could you provide some more information about the type of plugin you want to develop? For instance, do you want it accessible via the cPanel & WHM user interfaces? Or, is it script you want an administrator to be able to run from the command line? Thank you. 0 -
Hello Michael, Thank you for your reply. I want it to integrate with cPanel. It will run under cPanel. For instance, Our devs will use this plugin and issue a migration to our development server. So it's basically going to clone the whole site to another server. But I want them to be able to give some input in a form which will place the values for script. The dev server IP, user and password or what the dev URL would be. Then the plugin will clone the cPanel user's website to dev site and search-replace the urls with wp-cli. I'm just confused how I will connect the individual forms with the script. Note that the dev site is not cPanel, it's plain LAMP server. I was thinking I can make it work like: script.sh input1 input2 input3. The scripting part isn't the problem. But the cPanel integration part IS. Best regards. 0 -
Hello, I recommend reviewing the following document to help you get started: Guide to cPanel Plugins - Developer Documentation - cPanel Documentation Additionally, you will need to develop an interface (e.g. PHP script) that interacts with your custom bash script. Stackoverflow is a useful resource for this. Here are a couple of URLS you may find helpful: How to interface PHP front-end with makefile/bash script? Run Bash Command from PHP Thank you. 0
Please sign in to leave a comment.
Comments
3 comments