Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Managed)
  3. Unexpected CiviCRM behavior after clone

Unexpected CiviCRM behavior after clone

Scheduled Pinned Locked Moved WordPress (Managed)
civicrmclone
11 Posts 4 Posters 1.5k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      S Offline
      superhua
      wrote on last edited by
      #1

      I cloned a managed WordPress install, but noticed that when I added a contact into CiviCRM it appeared in both the original and the cloned WordPress instance.

      This was unexpected to me as I thought a clone would be completely separate.

      Do the plugins of managed WordPress installs share data?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JLX89
        wrote on last edited by
        #2

        I ran into an issue a bit ago similar to this. When I cloned the app it copied the database details from the old WordPress app into the cloned version. You can open wp-config.php on both apps and see if they match. If they match, then that would more than likely be the problem.

        1 Reply Last reply
        1
        • S Offline
          S Offline
          superhua
          wrote on last edited by
          #3

          Thank you.

          Each wp-config.php is unique.

          To elaborate, only the CiviCRM data was the same. Creating posts did not carry over across WordPress instances.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            superhua
            wrote on last edited by
            #4

            Update: The civicrm.settings.php files are the same across both WordPress instances.

            I guess I would need to completely re-install CiviCRM to have a unique environment.

            1 Reply Last reply
            1
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @superhua this is most likely because CiviCRM in clone is using the same database as the previous installation. How does one configure CiviCRM ? Do you have to give it database information ? In general, it's not possible for the clone to access the previous app's database.

              Another aspect could be that maybe CiviCRM is using an API or external service? In that case too, contacts will appear in both places.

              S 1 Reply Last reply
              0
              • jeauJ Offline
                jeauJ Offline
                jeau
                App Dev
                wrote on last edited by
                #6

                @superhua I had this kind of problem after a wordpress clone with CiviCRM.

                https://forum.cloudron.io/topic/8809/civicrm-wordpress-can-t-connect-to-database-after-cloudron-reboot

                I had trouble understanding.

                1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  Out of curiosity why doesn't CiviCRM share the database information with WP ? As in why doesn't it use WP's db function to read/write to start with ? (Maybe it's not a "plugin") ?

                  1 Reply Last reply
                  0
                  • girishG girish

                    @superhua this is most likely because CiviCRM in clone is using the same database as the previous installation. How does one configure CiviCRM ? Do you have to give it database information ? In general, it's not possible for the clone to access the previous app's database.

                    Another aspect could be that maybe CiviCRM is using an API or external service? In that case too, contacts will appear in both places.

                    S Offline
                    S Offline
                    superhua
                    wrote on last edited by
                    #8

                    @girish I installed CiviCRM by uploading the file to the plugin page under the WordPress dashboard.

                    From there, it auto configured itself. I did not give it database information.

                    girishG 1 Reply Last reply
                    0
                    • S superhua

                      @girish I installed CiviCRM by uploading the file to the plugin page under the WordPress dashboard.

                      From there, it auto configured itself. I did not give it database information.

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      @superhua right, that is what I would have expected. But looks like it is hanging on to the older db connection somehow.

                      1 Reply Last reply
                      0
                      • girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by girish
                        #10

                        @superhua Is https://docs.civicrm.org/installation/en/latest/wordpress/ the setup/download you are talking about? Just testing it out myself.

                        Edit: OK, indeed, when installing CiviCRM, it's reading the raw DB credentials from wordpress:

                        image.png

                        And it's stored raw in the above civicrm.settings.php file:

                        77499314-8c36-450a-a959-b05a4769f161-image.png

                        1 Reply Last reply
                        0
                        • girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #11

                          There's two DSN: CIVICRM_UF_DSN and right below the above screenshot CIVICRM_DSN . Both have to be updated after a clone.

                          1 Reply Last reply
                          1
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Bookmarks
                            • Search