Wordpress

CiviCRM on a localhost with WordPress or Drupal

Although the respective information on how to configure WordPress or Drupal on a localhost exists online, as well as how to set up CiviCRM with either of the two CMS’s, I’ve put together a guide so that you can get all the information from the one place. If you are here only to set up WordPress or Drupal locally this guide will also prove useful.  Note that alternative methods exist but this one is quite straightforward. Also don’t be deterred by the amount of programs mentioned below, there is such a huge amount of work removed from this process by the interfaces and automated setups they provide. This is a guide for Windows users only.

  1. First thing to do is download WAMPSERVER which provides an Apache Server, MySQL database and PHP all automatically configured setting the foundation for the local hosting environment. I chose the 32-bit-Apache 2.2.22 – Mysql 5.5.24 – PHP 5.3.13 version.
  2. Next run WAMP and find the icon in the bottom right of the Windows taskbar. You may need to click to show hidden icons. Left-click the icon and navigate to Apache>Apache Modules and ensure that the rewrite module is ticked.
  3. Next left-click the WAMP icon again and go to phpMyAdmin. This provides a convenient interface for your MySQL databases. When it opens in a browser go the database tab, enter a new database name and click create database leaving all the default settings. For convenience call this database drupal or wordpress.
  4. Download the latest version of Drupal or WordPress and extract once for zip or twice for tar.gz files using a program such as 7zip or just right-click the download and unzip.
  5. Open the folder which will be called Drupal[version] or WordPress[version] and take out the single folder inside named Drupal or WordPress. Place this in the ‘C:\wamp\www\’ directory. You can now change the name of this folder if you wish as this will be part of the url used to navigate to the content in the browser.
  6. Open a  browser window and type localhost/foldername/ and you should be redirected to either the Drupal or WordPress install setup. Follow the instructions and enter the database you had previously created. The username is ‘root’ by default and leave the password blank. That’s your local WordPress or Drupal site ready to go!
  7. Download the latest version of Civi CRM from the sourceforge page selecting ‘civicrm-[version]-drupal.tar.gz’ or ‘civicrm-[version]-wordpress.zip’ and extract/unzip. Again open the folder displaying the version number and take the civicrm folder from within.
  8. Place this folder in ‘C:\wamp\www\foldername\wp-content\plugins’ for WordPress or ‘C:\wamp\www\foldername\modules’ for Drupal.
  9. For WordPress, enter localhost/foldername/ you browser url and login to your WordPress site. Go to plugins and activate the CiviCRM plugin then go to settings>CiviCrm Installation. For Drupal enter ‘http://localhost/foldername/modules/civicrm/install/index.php’ into your browser url.
  10. The installation page prefills some fields. In Drupal the second database must be the one you created with root as the username and the password left empty. As you are logged into WordPress already this is not required. The other database for both will be created upon installation. Call it civicrmwordpress or civicrmdrupla for convenience and give it username root and an empty password for now also. Tick load sample data unless you’d prefer not to. At this stage almost all of the requirements will be OK if you have entered the correct database, username and password. However ‘Does MySQL thread_stack meet minimum (192k)’ will likely not be OK after setting the databases. You must  click the WAMP icon in your Windows taskbar and click restart all services. Then click re-check requirements back in the installation Window in which case all requirements should be OK. You’re ready to install will appear at the top of the page and click Check Requirements and Install CiviCRM.

Running from a localhost is a great free method to experiment with any of the programs mentioned above. Perhaps create a full-backup of your online WordPress.org site (to be covered in a future post) for a piece of mind or to try some plugins or edit some code. If your considering paying for a WordPress.org account, this is a great free method to take every aspect of the CMS for a test run.Perhaps you only want CiviCRM running on a local computer in the office to store important data about customers or employees. Having access to your server setting’s and learning how all of the processes required for a CMS to work make this a worthy venture alone.

Standard