CiviCRM on WPEngine

CiviCRM: 4.7.7
Wordpress: 4.5.2
Host: WPEngine

After a normal and successful install, I ran into an issue where core assets (like jquery) were 404ing because of url paths. The solution ended up being adding this to the top of civicrm.settings.php (found in /wp-content/uploads/civicrm).


<?php
global $civicrm_setting;
$civicrm_setting['Directory Preferences']['customTemplateDir'] = '/nas/content/live/mysite/wp-content/civicrm/templates/';
$civicrm_setting['Directory Preferences']['customPHPPathDir'] = '/nas/content/live/mysite/wp-content/civicrm/php/';
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/nas/content/live/mysite/wp-content/civicrm/extensions/';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'http://mysite.wpengine.com/wp-content/civicrm/extensions/';
$civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://mysite.wpengine.com/wp-content/uploads/civicrm/persist/contribute/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://mysite.wpengine.com/wp-content/plugins/civicrm/civicrm/';

The source of this answer can be found here

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.