CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade / Install CiviCRM 3.x on Shared Hosting
Pages: [1]

Author Topic: Upgrade / Install CiviCRM 3.x on Shared Hosting  (Read 3129 times)

gmilo2

  • I’m new here
  • *
  • Posts: 5
  • Karma: 3
Upgrade / Install CiviCRM 3.x on Shared Hosting
October 10, 2009, 04:56:15 pm
Since my organization has had to install CiviCRM on shared hosting (Godaddy), I thought I would share detailed information on what worked for us.  There is some redundancy in the steps, but found it helpful in not rushing through it to avoid having to start all over.  If larger Pdfs were allowed (in the 100-200 kb range) then I would post a Pdf.

Upgrading/Installing CiviCRM on Shared Hosting

If the CiviCRM install or upgrade does not work on shared hosting (such as a Godaddy/Apache/MySQL/PHP shared hosting configuration), it is possible to install it on a local instance, and then transfer the files and database export up to that host and reconfigure everything back the way it was. 
 
Steps:
 
1.   Verify the database tables for CiviCRM on the production site are using the InnoDB engine (MySQL) and constraints are enabled.   Since the CiviCRM upgrade process may alter some of the tables (but not the data), it is a good idea to ensure there are no data problems before beginning. 

2.   On the production site, ensure that line 17 of  …/administrator/components/com_civicrm/uninstall.civicrm.php  is commented out:

  //CRM_Core_DAO::dropAllTables( );

3.   Make a complete backup of the production site: directories, files, and the full database.  Do not store this backup in either of the com_civicrm directories.  If a package such as JoomlaPack is used, it may be helpful to take a separate export of the database outside of that process.  Keep the backup somewhere safe.

4.   When exporting/importing any MySQL database, the setting "use extended insert" in phpMyAdmin may create insert statements that cause timeout problems when restoring larger tables.  It is better to generate individual insert statements when possible.

5.   From the production site:
 
a.   Keep a separate copy of the Joomla configuration.php …just in case...
b.   Keep a copy nearby of:
   .../components/com_civicrm/civicrm.settings.php
   .../administrator/components/com_civicrm/civicrm.settings.php
   .../administrator/components/com_civicrm/civicrm/civicrm.config php   
c.    Make notes about the permissions assigned to the CiviCRM files/directories on the production site in case the file transfer at the end assigns them differently than desired.
 
6.   Use a local instance that mirrors the production site.  One such instance might be WAMPSERVER, with the versions of Joomla and CiviCRM synchronized with the same versions as the production site. 
 
7.   The goal is to get an exact copy of the production site working on the local instance.  The files and the database will need to be identical (the directory paths in the two civicrm.settings.php files, civicrm.config.php, configuration.php files will of course be different).  It may be necessary to use double slashes in place of single slashes in directory paths to get this working on a Windows local instance.  In civicrm.config.php, single slashes probably will work okay for directory paths.

8.   Verify that the CiviCRM tables on the local instance are using InnoDB (if MySQL) and constraints are enabled (the new installation of CiviCRM will check for it).

9.   Issue the follow SQL on the local instance:

            UPDATE civicrm_domain SET config_backend=NULL;

10.   Review directory permissions to ensure they are set correctly.
 
11.   Log into Joomla administration on the production site and try out various CiviCRM administrator tasks to see that the configuration is correct.  There is also a good configuration checklist inside the tool that can assist.  It may be necessary to rebuild the CiviCRM menus.  If so, go to the following URLs (substituting for ‘yoursite’ local instance):

http://<<yoursite>/administrator/index2.php?option=com_civicrm&task=civicrm/menu/rebuild?reset=1

12.   Logout and log back into Joomla administration.

13.   If the CiviCRM administration console is not accessible via the menus it means that the jos_components table may not have the appropriate entries for the CiviCRM menu items (retrieve this information from a backup).  Try the following link (substituting for the site)

http://<<yoursite>>/administrator/index2.php?option=com_civicrm&task=civicrm/admin&reset=1&
 
14.   Do not proceed until the local instance works identically to the production instance.
 
15.   From the local instance, keep a separate copy of:

   Joomla’s configuration.php
                 .../components/com_civicrm/civicrm.settings.php
                 .../administrator/components/com_civicrm/civicrm.settings.php
                 .../administrator/components/com_civicrm/civicrm/civicrm.config.php
 
16.   Take a database backup of the local instance (or, a full backup).
 
17.   Download the binaries of the new version of CiviCRM.  The "-alt" versions are usually best.
 
18.   Follow the upgrade instructions provided by CiviCRM exactly, with the following checks:
 
a)   Ensure the following in the local instance before uninstalling:

uninstall.civicrm.php  ‘s line #17 is set the same as referenced in the earlier step.
//CRM_Core_DAO::dropAllTables( );

administrator/components/com_installer/component/com_civicrm/admin/configure.php has line 7 listed as:  $civicrmUpgrade = true;   

Do the same for the same files in the downloaded/new version of CiviCRM before moving the unzipped com_civicrm directory to the install directory where Joomla looks for it.  Keep in mind that if some day it is necessary that the uninstall process of CiviCRM has to drop tables, then this line will need to enabled.

b)  When uninstalling CiviCRM from the local instance - After the uninstall component success message, verify that the two com_civicrm directories were deleted.  Also delete the .../media/civicrm  directory because the uninstall program does not uninstall it.
 
              c)  Finish the upgrade instructions and be sure to run the database upgrade script successfully.
 
19.   Review the installation to ensure it is working properly on the local instance.   

20.   Create an export of the CiviCRM tables from the local instance.
 
21.   On the production site, uninstall CiviCRM.  After it completes, verify that the following directories no longer exist:

.../components/com_civicrm
.../administrator/components/com_civicrm
.../media/civicrm
 
22.   The CiviCRM tables should have all been deleted – if not, drop them.  Be sure to disable constraints before trying to drop tables.  And, always have a backup in place before beginning.
 
23.   Using the export of the CiviCRM tables from the local instance, import the CiviCRM tables into the production database.
 
24.   Next, move the following folders from the local instance to the production instance, using a secure transfer method, if possible:

.../components/com_civicrm
.../administrator/components/com_civicrm
.../media/civicrm
 
25.   Review the copies originally saved from the production instance:  .../components/com_civicrm/civicrm.settings.php
.../administrator/components/com_civicrm/civicrm.settings.php
.../administrator/components/com_civicrm/civicrm/civicrm.config.php
Make the appropriate adjustments to the newly copied files on the production site so that directory paths, database connection strings, and other settings are correct.

26.   Be sure that the newly imported CiviCRM tables are using the InnoDB engine and constraints are enabled.

27.   Issue the follow SQL:

            UPDATE civicrm_domain SET config_backend=NULL;

28.   Review directory permissions to ensure they are set correctly.
 
29.   Log into Joomla administration on the production site and try out various CiviCRM administrator tasks to see that the configuration is correct.  There is also a good configuration checklist inside the tool that can assist.  It may be necessary to rebuild the CiviCRM menus.  If so, go to the following URL (substituting for ‘yoursite’):

http://<<yoursite>/administrator/index2.php?option=com_civicrm&task=civicrm/menu/rebuild?reset=1

30.   Logout and log back into Joomla administration.

31.   If the CiviCRM administration console is not accessible via the menus it means that the jos_components table may not have the appropriate entries for the CiviCRM menu items (retrieve this information from a backup).  Try the following link (substituting for the site)
 
http://<<yoursite>>/administrator/index2.php?option=com_civicrm&task=civicrm/admin&reset=1&
   
32.   When satisfied be sure to take a backup of the production site and database as soon as possible.

--G. Frazer, CiviCRM forum user gmilo2, 10/10/09
--Used most recently for Civicrm 3 upgrade from CiviCRM 2.x

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Upgrade / Install CiviCRM 3.x on Shared Hosting
October 12, 2009, 06:40:02 am
Thanks for sharing above!

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade / Install CiviCRM 3.x on Shared Hosting

This forum was archived on 2017-11-26.