• I have moved my WP installation to a subdirectory as explained here:
    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    I have split my .gitignore into the global one in the root directory of my site, and another one in the directory where WP is installed, specific to this installation. (I am planning to install more instances of WP in different directories for different languages, and it is easier to have a few identical copies of .gitignore in each directory rather than have different sections in the global .gitignore for each WP instance.)

    Revisr on its settings page offers to change the global .gitignore only; for my configuration this is inappropriate since this global file lists files that do not belong to this WP instance.

    Even if I decided to have just one .gitignore, then Revisr in each WP instance would give me access to this global .gitignore; I do not know which conflicts will it cause.

    It is not a big deal for me as I can edit my .gitignore files directly.

    However, you may think what is the most appropriate decision in this case. I would vote to let each Revisr edit .gitignore in its install directory.

    Thanks again for this great plugin.

    https://www.ads-software.com/plugins/revisr/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter byoussin

    (@byoussin)

    After installing two more instances of WP, I found out that Revisr on each instance covers the entire site, not just the install directory of WP.

    This is definitely a great feature, since (1) it allows to keep Revisr only on one of the instances of WP, and (2) Revisr covers also the files that are outside the install directories but inside the site.

    I would suggest mentioning this great feature in the plugin description.

    With that, I take back all what I said in my initial post.

    Thanks again for the great plugin.

    Thread Starter byoussin

    (@byoussin)

    After playing more with my configuration, I found that I do need Revisr in all instances of WP for the purpose of backing up the database since each Revisr backs up only the database of its instance.

    With that, I have two feature requests:

    1. For those backups for which the commit message is generated by Revisr, mention the install directory of WP in the commit message.
    This refers to commits generated by pressing Backup Database button on Revisr dashboard, and to the scheduled automatic backups.
    I can find this info from git diff afterwards but this requires work because the database diff is large.

    2. Make an option for automatic backups to back up the database only, not the files.
    The problem is that Revisr automatic backups need to be set in all instances of WP for DB purposes, and they would back up the same files.
    I do not want to think what will happen if two git processes will attempt to commit the same files simultaneously, and this is what is going to happen since git does not allow setting specific time for automatic backups.

    Thanks again.

    Thread Starter byoussin

    (@byoussin)

    On the second thought, it is not clear for me whether Revisr instances on different instances of WP running simultaneously would not corrupt the git repo even if they try to commit simultaneously different files.

    One solution would be to create a lock that would force one instance to wait if another one is doing its job.

    Another option would be to have Revisr only on one instance of WP and in others use some other plugin – or just a cron job – to back up their databases at scheduled times.

    Plugin Author Matt Shaw

    (@mattshaw)

    Hi,

    Thanks for the details on how you’re using Revisr and suggestions/feature requests.

    A lot of this functionality is currently being reworked for the next release – some will be in a pro version or an add-on.

    Starting with 2.0, settings will be more modular, and there will be functionality that allows multiple instances of Revisr to work alongside each other, as submodules or otherwise.

    If multiple instances are detected, there will also be a way to differentiate which instance/directory the commits are coming from, etc. All this functionality was originally meant to support workflows such as a different repo for each plugin/theme, or for tracking files that may not be necessarily tied to the WP document root, but I suspect that there will be quite a few other uses as well.

    Can you please let me know what you mean by different instances of Revisr on different WP installations causing a corrupt repo? Are you tracking the same files across multiple repos?

    Thread Starter byoussin

    (@byoussin)

    Hi Matt,
    Thanks again for this great plugin.

    Can you please let me know what you mean by different instances of Revisr on different WP installations causing a corrupt repo? Are you tracking the same files across multiple repos?

    I have three different WP installations in three different directories, each having its own DB, to cover the three languages in which I write.

    Each installation of WP has its own Revisr; this is what I mean by different instances of Revisr.

    Each of these instances covers the entire site (that is, its repo is the root directory of the site, so that they use the same repo), and records the files that must be ignored, in the .gitignore file in the root directory of the site. Git commands that are issued by Revisr, also take into account the identical .gitignore files that I placed in each of the WP installation directories.

    With that explained, each of the instances of Revisr will track the same files, without any possibility to deviate from this; the difference between them is only in the databases they back up, each one backing up the DB of its WP instance.

    If I set automatic daily backups on all three instances, I have no way to indicate the times to fire these automatic backups, and they will be done at the times you have hard-coded (unless you hard-coded random times).

    This means that the daily backups on all three Revisr instances will be fired simultaneously by three php processes.

    These three concurrent processes will try simultaneously to back up the DBs, stage files and commit.

    I do not think git has been designed for concurrent staging and committing in the same repo; different users/processes are supposed to use different repositories, and push/pull to sync them.

    I have not been able to understand whether git will be able to manage this; the closest reference I have found, is this one that says that they have seen corrupt repos from concurrent fetches and pulls:
    https://forums.perforce.com/index.php?/topic/3921-lock-file-preventing-concurrent-transactions/

    Note that scheduling the auto backups at different times is not a good solution since various delays may cause the backups to to be fired by the same wp-cron run.

    I think it would be cleaner and more efficient if one Revisr instance were able to back up all databases. In this case other instances may be removed, and all problems with multiple installations will be resolved, as far as I can understand.

    If you do allow backing up more than one database, it would be a good idea not to limit it by WP databases. For example, for some time I have run Piwik analytics on my site, and it had its own database. It would be great if Revisr were able to back up all such databases run by other web applications.

    Hope this helps.

    I am glad you are working on this.

    Thread Starter byoussin

    (@byoussin)

    Correction: I wrote that “scheduling the auto backups at different times is not a good solution since various delays may cause the backups to to be fired by the same wp-cron run”.

    In fact, the backups run by different instances of Revisr will be fired by wp-cron’s of their WP instances, which run separately.

    I run wp-cron’s by cron jobs, and can schedule them for different times of the hour.

    However, I would still be uncomfortable with the possibility that delays may cause clashes between git add and commit of different instances.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘When WP is in a subdirectory, Revisr displays the global .gitignore file’ is closed to new replies.