How to use VSCode with Presslabs

This is a tutorial on how to use Visual Studio Code editor with Presslabs.

In this tutorial, we will show you how to easily set up and make changes to your Wordpress site’s using the VSCode IDE.


1. Install VSCode IDE

Firstly, you need to install the Visual Studio Code and it can be done from here .

2. Clone your website repository

At this step, you need to open the VSCode and you can see that appears two options, exactly Open Folder and Clone Repository as in the below image. Open VSCode

Select Clone Repository option and introduce the repository HTTPS URL which you will take from the Gitea or from your project from Github. Open VSCode

Also, you can use the SSH URL but for this to work, you need to load a SSH key in our hosting platform like here . Now, you could paste the URL in the Git at Clone section and after that, tap Enter and you need to chose the folder where you want to clone the website repository. After that, the cloning process will start. When it is finished, you can open the repository and will see the VSCode dashboard like this: Dashboard

3. Stage files and Commit

In the left part, you can see the Source Control icon in the Activity Bar. There are the changes which you have in your current repository.

Source Control

From here, if you click on the each item, you can see in detail the textual changes within each files, in my case, details regarding the modification which have done in the ads.txt file from my website repository.

Details about changes

If you want to stage(git add) the modifications you have done, please click the “+” button like in the following image:

Stage

Also, if you’ve decided to cancel and don’t want to commit the change, you can unstage it by clicking on " - “, as below:

Unstage

For commit your staged modifications, firstly you must to add a message for it. You could do this in the Source Control like in the image below. After you leave a message, please click on the Commit button.

Commit

3. Pull and Push

Now, to apply the changes live, you must press the Sync Changes button.

Pull and Push

4. Check live Wordpress site

After you Pull and Push your modifications, you can check the Wordpress live website to see if the modifications have been applied.

Wordpress check

You can also check the Gitea like below, or your remote repository from Github, to see the commit you have been done.

Check the commit