Warning: Constant SAVEQUERIES already defined in /var/www/vhosts/davidperezgar.com/httpdocs/wp-config.php on line 28
WordCamp Madrid Talk Forget FTP: Improve your workflow with Version Control and Git Push – Davidperezgar.com
Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /var/www/vhosts/davidperezgar.com/httpdocs/wp-content/plugins/wpautotranslate-pro-mlp/public/class-wpautotranslate-public.php on line 95

WordCamp Madrid Talk Forget FTP: Improve your workflow with Version Control and Git Push

·

·

This article is the detail of my speech in the WordCamp Madrid 2019. Next I will share with you a simple guide to deploy your WordPress files on a server directly, without the need for FTP.

Video of the presentation on WordPress.TV

Slideshow

Slideshow in Keynote

Deployment with Plesk Onyx and BitBucket

The process would describe it in 10 steps, in order to establish a deployment flow in Plesk servers with a BitBucket repository (it’s similar in GitHub).

1. Create a repository

2. Clone in local

3. Create Gitignore file and git push

If you are going to create a repository for your Web, I recommend that you use this .gitignore, which is designed to only have in the repository the folder /wp-content/mu-plugins and the folder /wp-content/themes/your-theme-son/.

What we try to do is ignore third party programs and only include those we make for a web in WordPress.

4. Git Settings

paso 4 configurar git

5. SSH Plesk password

paso 5 clave plesk

6. Add SSH password to Bitbucket

paso 6 ssh
paso 6 clave

7. Deploying the repository

paso 7 desplegando repositorio

8. Webhook repository configuration

paso 8 webhook

9. Webhook in Plesk

paso 9 webhook

10. Webhook configuration in Bitbucket

paso 10 webhook

Deployment with GIT FTP

You can use the GIT FTP service on your computer to be able to display your files once you have made the Push changes to the repository.

To configure this workflow, you would have to follow the steps below:

1. Install GIT FTP on your computer

To install GIT FTP, I recommend this tutorial, which is pretty good.

2. Configure the repository with FTP access data

In the .git/config file you can edit it and add the following lines:

This will allow you to link the FTP access to upload the files.

If you want certain files not to be uploaded, you can put in the root of the repository

.git-ftp-ignore

And with the command git ftp init , and then every time git ftp push, you can upload the changes made in your WordPress repository.

Deployment with SiteGround and Git

Some reactions in the WordCamp Madrid 2019


11 responses to “WordCamp Madrid Talk Forget FTP: Improve your workflow with Version Control and Git Push”

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.