Giter VIP home page Giter VIP logo

civicrm4joomlafixer's Introduction

CiviCRM for Joomla Fixer

The Problem

If you use CiviCRM you know that moving a site is problematic. This is caused by CiviCRM storing vital information in a couple of configuration files, which are tedious and error-prone to fix by hand.

If you are using Joomla with CiviCRM there is a handy utility from Akeeba, Akeeba UNiTe to take unattended backups from a site, remotely or as a backup file, and restore it locally or at a staging site. But you will still have the problem above.

The Solution

UNiTE allows you to run a custom script after restoring the site. Enter CiviCRM4JoomlaFixer.

unite.yaml is an example configuration for UNiTE that you can tweak for your situation. It will run the fixer script at the end of the restore.

Configuration

The script figures out most of the old and new values by itself from the restored site. The only thing it cannot know is the URL to the restored site. This has to be passed as an environment variable, NEW_WEB_HOST when executing the script and thus the unite command:

NEW_WEB_HOST=<yournewhost> unite restore unite.yaml

The script will print all old and new values that it uses to fix the CiviCRM configuration files so that you can check that they will work.

Further automation

I use devilbox to run multiple local sites under separate subdomains under localhost (actually a domain that always points back to 127.0.0.1 such as localhost.tv, dvl.to or similar).

Then I have a script that uses the last part of the current directory as the subdomain and creates a unite.yaml with that. As I use the domain name as dbname, dbuser, dbpassword in the database I can completely automate a restore.

You can find that script in restore_to_devil_box.sh.

civicrm4joomlafixer's People

Contributors

thoni56 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.