PHP Script to pull changes from GIT Repository

Here is a PHP script, that pulls the latest code from Git Repository to your website.

https://gist.github.com/serverok/7efc12fcd75aac21309dbe234d9030f6

Upload the file to your web server as git-pull.php, access it with URL

For this script to work, your web server should work as the user that owns the files. If your webserver runs as www-data, you need to chown the files as www-data.

Example

See git

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *