Upgrading CiviCRM for WordPress¶
Use this document to upgrade CiviCRM installations on WordPress to the latest CiviCRM release.
Before upgrading
Make sure you have done the steps listed in before upgrading first.
Download the latest code¶
- Go to the CiviCRM website
-
Select the latest currently available CiviCRM zip file for WordPress.
Example:
civicrm-x.x.x-wordpress.zip
-
Save this file in
<wordpress_root>/wp-content/plugins/
.
If using localization, also download the latest version of the localization files. See the CiviCRM Localisation page about how to install files for running CiviCRM in languages other than American English.
Prepare WordPress¶
Make sure you have logged in to WordPress as an administrator. Do not log out until the entire process is complete.
Backup¶
CiviCRM files and database¶
- Backup your existing
/wp-content/plugins/civicrm directory by creating an archive or FTPing it to your local computer. - Backup your existing database using your Control Panel or other method so that you can recreate the database if required.
- Find your
civicrm.settings.php
file. CiviCRM needs to use thecivicrm.settings.php
file during the upgrade. The default location is<wordpress_root>/<content-dir>/uploads/civicrm/civicrm.settings.php
. If the file is there, please proceed. If not, the settings file may be in its legacy location<wordpress_root>/wp-content/plugins/civicrm/civicrm.settings.php
. If you find it there, please move to<wordpress_root>/<content-dir>/uploads/civicrm/civicrm.settings.php
and then proceed. - Check to see if you are using a custom
settings_location.php
file. This should be located at<wordpress_root>/wp-content/plugins/civicrm/civicrm/settings_location.php
. If so, make a copy of this file as you will need to restore it after upgrading.
Now upgrade the filesystem¶
Remove old CiviCRM files¶
CiviCRM will not run properly if files from previous version are present after the upgrade.
- Make sure you have a good backup of your complete previous version installation
- Delete
<wordpress_root>/wp-content/plugins/civicrm
Install new CiviCRM files¶
-
Unpack the files.
$ cd <wordpress_root>/<content-dir>/plugins $ unzip <civicrm_download_file>.zip
Install localization files (optional)¶
If your site requires the localization files, download the civicrm-x.x.x-l10n.tar.gz
from civicrm.org/download
These files must be untarred under <wordpress_root>/wp-content/plugins/civicrm/
. Please note the tar.gz
file only contains /civicrm
not /civicrm/civicrm
$ cd <wordpress_root>/<content-dir>/plugins/civicrm
$ tar -xf ../civicrm-x.x.x-l10n.tar.gz
If you don't have SSH access and your IP panel does not recognize tar files, you will need to convert it to a zip file.
- Uncompress
civicrm-x.x.x-l10n.tar.gz
- Uncompress
civicrm-x.x.x-l10n.tar
. You should now have acivicrm
directory with 2 subdirectoriesl10n
andsql
. - Rename
civicrm
tocivicrm2
. - Create an empty
civicrm
directory. - Move the
civicrm2
directory (with the 2 subdirectories) into your newcivicrm
directory. - Rename
civicrm2
tocivicrm
. - Zip the
civicrm
directory and name itcivicrm-x.x.x-l10n.zip
- Now, you can upload
civicrm-x.x.x-l10n.zip
into<wordpress_root>/wp-content/plugins/
- Unzip
civicrm-x.x.x-l10n.zip
and continue with the following steps.
Clear cached files¶
Delete all files in your <wordpress_root>/<content-dir>/uploads/civicrm/templates_c
directory and if it exists, all files in <wordpress_root>/<content-dir>/plugins/files/civicrm/templates_c
Upgrade the database¶
-
Point your web browser to the following URL
http://example.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1
-
You should see the Upgrade screen.
- If you are ready to upgrade, click the Upgrade Now button.
-
You should see the message Upgrade successful when the upgrade completes.
- If you receive any errors during the process, please note down the exact error message, and check for solutions on Stack Exchange or Mattermost.
-
Now click the Return to CiviCRM home page link. This will rebuild CiviCRM menus automatically and return you to the CiviCRM home dashboard.
Post upgrade¶
See these steps to take after upgrading.