How can you use VIP Scanner to scan and test plugins - wordpress

VIP Scanner documentation talks about its ability to scan and test plugins but I cannot find anywhere that talks about how this is achieved. Can anyone provide any clarity on the ability to scan plugins?

The best place I found was the Github respository for the plugin here:
VIP Scanner Github Repository
There is a file there called HACKING.md that has a code walkthrough. Hopefully that helps.

I was able to achieve this by following these steps
Clone the vip-quickstart project
In vip-quickstart dir start VM by running vagrant up
navigate to plugin dir i.e /srv/www/wp-content/plugins/{PLUGIN NAME}
run command wp vip-scanner scan
This scan provided all the errors that needed fixing for the WordPress VIP platform

Related

How to push small local changes to remote server with Git and Wordpress?

I'm new into Git and I'm working with Wordpress themes.
I was always using FTP client to push every small change into my remote server... I mean sometimes it was just one line of code to check the change of CSS. It was easy and nice but there will be always problem with reverting changes and since I'm learning Git, I want to change it.
I've found two ways to do it:
git-ftp
i've tried to connect my local respository with GitHub and my intention was to automatic pull changes into my remote server from GitHub (it's not working yet, i need to configure it better)
BUT, do I have to commit every single small change? Because I cant just save file and check changes with Browsersync on second monitor, I will have to commit so many times. Also which way will be better for me - maybe there are another, better ways?
I really want to improve my performance, but it looks like that's not easy or I'm doing something wrong? I know about existence things like WP-CLI, webpack, gulp but often I'm creating small websites and probably I will spend more time on configurating those things than create theme. Also I thought about working on localhost, but I really think that I'm complicating things and my job.
Really sorry if it's wrong section, but I'm new on stackoverflow - hey! I will be really thankful if you can help me, because I think that i need knowledge of someone experienced.
I'm not sur to be helpful but I'll try :
First, even for a small project, I always prefer to install a local environment for testing. It avoid risks on your remote server !
You can take a look here : https://make.wordpress.org/core/handbook/tutorials/installing-a-local-server/
Then, if you have an SSH access to your server, may be you can try to configure it to push directly from your local environment to your remote server. Here is a simple tutorial : https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
It depends on what remote system or vps you are using.
It could be from GCP, AWS, DIGITAL OCEAN, or WP itself.
It looks like that you are using the wordpress hosting your website.
If so, you might use wp cli to login the server.
①As for the frequent testing and updating, it is a good idea to copy the remote project to your localhost. Run your web app using wampserver. And create a new repository in the github and connect it with your local folder.
Then you could use git to version control your codes, do pull and push, stash or whatever.
And after testing, you could upload the specific files or folder to the remote server via ftp or sftp periodically.
②Another way is to install the git bash or git software in your server side.
It depends on the OS you are using. If it is a win or linux.
$ add-apt-repository ppa:git-core/ppa
$ apt update; apt install git
and create new user, add it into the sudo group
create a repository in your server side and link it to the github remote repository.
I am not sure whether the second way would work.
I recommend you try the first method.
Hope this could help. Happy coding.

How to run a plugin in artifactory

I have copied a sample Artifactory plugin which is a groovy file from git.
but i want to know how to run it. does it show in the GUI? or do i have to run it using some tool to check if its working. How to run groovy plugins in Artifactory.
https://www.jfrog.com/confluence/download/attachments/46107593/samplePlugin_v4.groovy?version=1&modificationDate=1399538106000&api=v2
The example plugin that you attached as a link is basically an example to all of the closers you have in Artifactory for triggering user plugins.
You should decide first what is the action that you need to do if it's execution or an event-based trigger.(For example, afterDownload).
You should really read the wiki page by JFrog on the User Plugins:
https://www.jfrog.com/confluence/display/RTF/User+Plugins

Git Siteground Deployment WordPress Sublime Text

I am a beginning developer looking to get a great workflow setup before I begin my personal website: kevinbmccall.com
The site has WordPress installed and is hosted by SiteGround.
I enjoy the Sublime Text 3 Editor and am looking to emulate the workflow described here: http://joshuaiz.com/words/the-ultimate-workflow/
I was already in the process of learning Git through the terminal and had a GitHub repo setup through a local project folder. So I didn't really follow Joshua exactly and may have been what led me to get stuck but I think I got to the SSH part.
Here is what I have done so far:
Installed Sublime Text 3 with SublimeGit Package
Installed Wordpress on kevinbmccall.com
Deleted all files from local projects/kevinbmccall folder with git
Copied all files from siteground server to local folder
Added and Committed all of these changes to github repo
Tried Adding PHP Script to siteground server and setting up webhook
Issue: "I want the server to sync with my github repo so I can easily deploy to my live site every time I push to github"
Here is what I can do now:
I can make local changes to my project folder, add them and commit them no problem.
This correctly updates my github repo fine but does not seem to deploy yet.
If I make a change to my local folder, add, commit and check the status it will tell me of an origin/master that is behind in commits and recommends a push
I can push and even see some sort of request triggered because of that attempt at a PHP script I think but I was hoping to see the test txt files show up on the server and they did not.
My Thoughts:
I think my issue has to do with writing to the server and maybe the SSH setup through Siteground. I generated a key but never really used it and all of the online material from siteground points to their SG-Git tool in the c-panel. This requires a more expensive monthly plan and I am just a beginning developer trying to get a personal site up. I am sure the deployment can be accomplished without this upgrade.
Thank you to whomever replies. My goal is to learn as much as possible so I am even more interested in the explanation than the solution.
In my opinion, maybe you need GitHub Webhooks.
This is a demo
// Init vars
$LOCAL_ROOT = "/var/www/my_new_site";
$LOCAL_REPO_NAME = "public_html";
$LOCAL_REPO = "{$LOCAL_ROOT}/{$LOCAL_REPO_NAME}";
$REMOTE_REPO = "git#github.com:jonathanstark/my_new_site.git";
$DESIRED_BRANCH = "dev";
// Delete local repo if it exists
if (file_exists($LOCAL_REPO)) {
shell_exec("rm -rf {$LOCAL_REPO}");
}
// Clone fresh repo from github using desired local repo name and checkout the desired branch
echo shell_exec("cd {$LOCAL_ROOT} && git clone {$REMOTE_REPO} {$LOCAL_REPO_NAME} && cd {$LOCAL_REPO} && git checkout {$BRANCH}");
die("done " . mktime());

Where do I place my own code whilst using Vagrant+Chef+Wordpress (VCCW) repository cloned from GitHub?

I ran across the VCCW project and despite my unfamiliarity with Vagrant and Chef, decided to give a try. I followed their instructions and obtained the VCCW project itself by installing the GitHub Windows program and cloning the VCCW GitHub master repository. I should also mention that I have very little experience with Git.
Anyway, now I have VCCW Wordpress running on my machine, but I've no clue what to do from here. I wanted to set up a better and more formal Wordpress development environment so I could write my plugin and modify a theme, but I don't know where I should do that. I know where the actual Wordpress installation resides on my file system, so I suppose it would be easy to work from there, but I don't know how (if at all) that interplays with the Vagrant workflow - ie, when it comes time to use Vagrant to deploy my site, will my changes to the "www" folder (which was created by vagrant up) be captured? Somehow I doubt this. Just looking for any help as to how all these fancy new tools work with each other and what a humble PHP developer like myself should do to get started.
Edit: One more question: which IDE, if any, can I use in conjunction with this arrangement? Create a new project from existing sources, and let it pollute my deployment folder with project files?
From the Vagrantfile, it looks like you should look in ./www/wordpress after provisioning.
VCCW includes deployment tool WordMove.
You can deploy WordPress into your server from vccw if you set Movefile.
Movefile will be created automatically after provisioning, so you should add your server configuration in Movefile.
http://vccw.cc/#h2-10
https://github.com/welaika/wordmove

How to update (some files) a Symfony2 project to remote

I've been developing with Symfony1.4 'till now and had no problem to deploy a project or update it into a remote hosting. I just used sfFtpPlugin and everything was perfect: http://www.symfony-project.org/plugins/sfFtpPlugin
But now I'm starting with Symfony2 (2.2.0) and the first of all I had this question: how to update it when I make changes?
For the first time deploy I know there are some options: upload full project by FTP or use Maestro (e.g. offered in the ServerGrove.com hostings) With those tools I can upload everything, but in the case where I need to update... ¿50? files, I cannot manually do by FTP, of course.
Thanks everyone for helping!
P.S: Aditional info: I have some SVN knowledge and started learning GIT a few days ago.
The documentation on this is fantastic. The Cookbook provides workflows for both Git and SVN.
http://symfony.com/doc/current/cookbook/workflow/index.html
If you have no shell available, you can use composer on your local machine to update your project and then FTP the entire project over.
This covers how to store settings for different environments:
http://symfony.com/doc/current/cookbook/configuration/environments.html
Personally I use a private Satis repo for deploying all my code.
That way I never have to use FTP, just composer create-project/install/update.

Resources