Cyber Sale! Enjoy 30% OFF

On all web design & development services

Tutorial: Compare theme files with Winmerge

In this section, you will learn how to compare files or folders to check the structure/code differences. This operation may be useful in many cases. One would be when you want to check the code modifications between different versions of the theme. To compare theme files, we will use Winmerge, a free tool. You can check its documentation here.

Installation:

We won’t cover this area here; it is explained in detail in the software documentation – here.

Configuration:

You can access the settings area from the menu Edit -> Options. The most important settings are located in the Compare tab, from here you can specify how the compare process works. Depending on what you want to compare, you can set it to ignore certain aspects (ex. white space, blank lines or carriage return differences) if you don’t consider them essential and you want to return only the result on which you’re interested. The settings used by us are presented below, but you should play with the settings until you obtain the results you’re looking for. The Compare -> Folder settings were not modified.

compare theme files

Compare:

In the following example, I will compare the Newspaper theme folders for version 9.2 and 9.2.1. To do this, open Winmerge, and click on the File -> Open… menu. You can also use the shortcut CTRL+O. This will open a new window, and you have to choose the directories or files that you want to compare. In my case, I’ve selected the folders for Newspaper version 6.5 and 6.5.1. The other filters were set to compare all files and include subfolders.

compare theme files

Once you’re done, click the Compare button and wait for the compare process to be complete.

compare theme files

If you double click on a file, you can see the differences between them as highlighted. In the following image you can see the style.css file on which only the version was changed from 9.2 to 9.2.1, and on the left, you can find the Location panel where you can see the position of the lines which are changed from one version to the other.

compare theme files

Merge:

As the title says, this software comes with options to merge the compared files, you can find them in the Merge menu. We will not discuss them in this tutorial, but you can read about them in the official documentation – here.

Subscribe For More!

If you want to be the first to find out more about our themes
please subscribe to our newsletter

Bogdan B.
Bogdan B.
Passionate for gaming, mountain biking, snowboarding and travelling. I face every task as a new challenge to bring my skills to the next level.

Do you need any help with the Newspaper or Newsmag WordPress Themes? Please send us all the necessary details via email or create a new topic on our online forum. We're always happy to assist you.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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