Installation, Upgrading and Requirements

    NOTE: There are a number of 3rd party install scripts available for Zenphoto (and other CMS). These scripts are often used by webhosts to provide "one-click-installs". Scripts such as SimpleScripts version 3 seem to execute each of the necessary Zenphoto setup steps and should produce identical results as following the installation steps below.

    Others try to reproduce the end result of an installation. These latter may not reliably accomplish their goal and leave a flawed installation. Also please note that some hosts seem to provide outdated versions for unknown reasons.

    We do not test these scripts and cannot provide support if their use causes Zenphoto problems.


    1. Download the latest version of Zenphoto.
    2. Extract the files to your computer then upload all files and folders as listed below to your web directory via FTP. You can upload them either in the root of your webspace or within a subfolder.
    3. Create a MySQL database. (technically Zenphoto can do this automatically but virtually no host allows this!)
    4. If you install on local server please also read Using Zenphoto on local servers.
    5. Navigate to your gallery. Example: if you uploaded in a subfolder named "zenphoto" navigate to will run. (if it somehow does not, please navigate directly to Info about the required permissions if you run into issues.
    6. Enter the MySQL credentials (you get them from your provider) and make sure everything checks out.
    7. Then click GO!
    8. ENJOY!


    With anything after ZenPhoto 1.1.3, upgrading is super easy! These instructions apply of course also if you want to install a support build.

    Important note: 
    Each new version of Zenphoto provides new capabilities. We try to provide forward migration, but we do not test arbitrary upgrades steps.

    The only sequence we can guarantee to work is upgrading from the previous feature release and of course within from support release to support release of the same feature release. Even then you should check the release posts in case bugfixes do cause some other changes.

    If you are skipping any significant number of releases, check the support forum for upgrade issues. 

    Also never upgrade individual files from the Zenphoto package only unless we have told so. As changes often influence several parts in the code, this may brake your site.

    1. Check if your server matches the requirementts
    2. If you use 3rd party tools like themes or plugins, check if updates are available. Old 3rd party themes and plugins may not be compatible with newer Zenphoto versions. Recommendation: If your site is an important live site to you or your client, always first test an upgrade – especially bigger version jumps – on a staging site either on the live server or in an local development environment (e.g. using WAMP, XAMPPMAMP) before performing the update on the live site. Then you can test if evrything works as expected without harming your live site in case anything goes wrong. Don't forget to review your logs for possible issue.
    3. Backup your MySQL database. You can use Zenphoto's own utiltiy "backup_restore" for the database content but for a full backup of the database use a tool like phpMyAdmin.
    4. Log into your existing site to be sure you know your Zenphoto user/password (you need admin rights!). Password recovery is not available during an upgrade!
    5. Be sure to backup customized themes or plugins – 3rd party plugins should always be in /plugins only anyway! – or any other customized files before replacing anything! Or selectively upload the official themes especially (see above!)
    6. Download the latest version of Zenphoto.
    7. Close your site for the public using the included site_upgrade plugin during the upload and setup process.
    8. Upload the following files and folders. Make sure your FTP client overwrites/replaces the folders. Depending on your FTP client it may ask if it should join/merge/update or replace folder contents. Some FTP clients tend to mess up overwriting, especially folders with lots of files, so good practice is to delete the old folders first and then upload the new files:
      1. index.php
      2. /themes (or actually just the four official themes within - again, backup if you have custom or customized themes within this folder!)
      3. /zp-core (especially here make sure that really the entire content is replaced so that no orphaned files because of removed or renamed ones are kept)
    9. Make sure the .htaccess file is writeable. If you do not have a .htaccess file, you will be given the opportunity to create one during setup. Given that your server supports .htaccess/modrewrite in the first place of course.
    10. Once the files are uploaded, navigate to (if you have installed Zenphoto within the folder zenphoto). Setup.php will run. If it somehow does not, please navigate directly to about the required permissions if you run into issues.
    11. Make sure everything checks out, and click go!
    12. Follow the instructions.
    13. You're done! Enjoy.

    Note: If you are upgrading to a support build from the GitHub repository to help testing, always upload the complete package, never just indiviual files unless you have been told otherwise by the developers. Also make sure setup is run manually. Avoid testing support builds on important live sites.

    Moving existing installations

    Note that if you are planning both a move of your installation and an update to a new version you should separate these steps. When you upgrade, setup will migrate your database to be consistent with the current version of Zenphoto. If you do some thing like restoring your database to what existed for a previous version of Zenphoto you have potentially compromised everything in your installation.

    So, bottom line, if you use MySQL to backup and restore your database, be sure you do so with the same version of Zenphoto running. Zenphoto does provide a backup/restore facility that is able to deal with many of the migration issues. But it is still recommended that you do your restore on the same version of Zenphoto that created the backup because you will not know if it can handle the migration until the restore.

    More detailed information on the article "Moving and changing existing installations".

    Re-running and re-uploading setup files

    Sometimes Zenphoto will request you to re-run the setup scripts and doing that lists files that might be a problem. This is a security measure if Zenphoto detects a change on your install. These can be files whose file time is off to the rest of them.

    This can happen if you upload theme files two hours after the core files so all is fine. But it could also be a hack of a file. 

    It also triggers if there are files that should not be there as it checks its internal file catalog. This is nothing but a warning. Setup offers to delete the marked files but you don't need to. It has to assume you know about your install and what files should be there.

    This might also be triggered if server software (e.g. MySQL or PHP) on your server has been updated.

    Re-running Setup on Zenphoto 1.4.6 or newer

    Using the <path to your install>/zp-core/setup.php link should unprotect the setup scripts and run them.

    On Zenphoto 1.5 or newer setup files are automatically protected after setup ran.

    Or you can use the utility button on the admin overview page to unprotect the scripts:


    After clicking this a new button will appear that allows you to run setup:


    Re-running Setup on Zenphoto versions older than 1.4.6

    On older Zenphoto versions you may need to re-upload the setup scripts. Here the setup scripts were not protected but indeed deleted. In that case you find them in the release package: /zp-core/setup.php (folder with several files). Re-upload that folder and navigated to <path to your install>/zp-core/setup.php to re-run. 


    Server requirements

    To operate Zenphoto efficiently, you need (our setup script will also tell you about possible problems):

    • A web server with at least 25Mb of free space (plus free space for images and cache files)
    • Apache* (it may work without problems on other server systems like nginx, IIS or lighttpd but we have not tested these.)
    • PHP 5.6+ (7.2+ strongely recommended) – it may still work with older versions of PHP below 5.6 but we actually don't test and won't fix any related issues.
      • NOTE: Zenphoto is not compatible and tested with PHP 8 yet
    • It is recommend that you have the following PHP extensions and settings:
      • One of these graphics libaries for image resizing:
        • GD graphics library (usually built in on servers)
        • Imagick graphics libary 6.3.8/Imagick 3.0.0+
      • safe mode off (recommended)
      • magic_quotes off (recommended)
      • register globals off (required)
      • gettext extension (optional, required if you plan to use Zenphoto's translation/multilingual capabilites - note that your server must have the locales for the languages installed you intend to use) 
      • mbstring extension (recommended if you are using a none English language with lots of special characters)
      • tidy extension (recommended to properly truncate text content containing HTML)
      • cURL extension (recommended)
      • mod_rewrite (recommended) – Note that non Apache servers not supporting htacess may require extra setup
    • MySQL 5+* (5.5.3+ recommended) – MySQL 4 is not supported - Compatible MariaDB versions should also work but are not tested specifically.
      • Appropriate user account rights. (Setup will note if you do not have sufficient rights.)
      • UTF-8 table and field collations

    *Zenphoto is developed and tested on Apache environment.

    Browser requirements

    The Zenphoto backend uses the JavaScript framework jQuery  – currently in Version 1.x – as the standard libary for all sorts of things so we basically can support what it does. That would be roughly:

    • Internet Explorer 7 or newer (we really recommend using the latest but never 6 or below…!)
    • Safari 5.1 or newer
    • Google Chrome (current version)
    • Opera 12.1/Opera 19 or newer

    Probably a lot does work in older browser as well but we don't and can't really test it. We therefore recommend to use the latest browser version possible on your system.

    Content of the Zenphoto package

    The Zenphoto package consists of these root items after extracting. This is what you need to upload. Note: Your FTP program should be set to merge files within the package folders with folders in an existing insallation. Setup will prompt you if any old files should be removed.

    • .gitattributes** – An invisible file from the Git version control on GitHub.
    • .gitignore** – An invisible file from the Git version control on GitHub. 
    • albums* – This folder contains the full images, videos etc. within subfolders (= the albums) after uploading. 
    • – This is just a markdown formatted text file with info link about how to contribute to the Zenphoto project. No need to upload this when installing.
    • index.php – This is the "front-end" script for Zenphoto. All references to the gallery go through it. Often referenced as the "root index file".
    • LICENSE** The Zenphoto GNU General Public License.
    • plugins – This is the place to store 3rd party and custom plugins, custom watermarks, etc.
    •** – This is a file from GitHub that just contains the intro text of the repository.
    • themes – As you may guess this contains the themes. Four standard themes are included.
    • uploaded* – This is the folder the (non gallery) file manager stores uploaded files.
    • zp-core – This is the Zenphoto core that runs everything.
    • zp-data* – This stores your zenphoto.cfg file, the Zenphoto setup, security and debug log files.

     During setup two additional folders are created:

    • cache -- The processed thumbnails and sized images are stored here.
    • cache_html -- Static files from RSS feeds, the static HTML cache plugin or the sitemap-extended plugin are stored here - if the given option or plugin is enabled naturally.

    If you are using the auto_backup plugin for database backups or the built in utility there may also be a backup folder.

    After running setup a .htaccess file and a robot.txt file will be created in the root if you select the related options. You may need to adjust the robots.txt file to your liking as it is set very strict by default.

    * These folders are empty in the package.

    ** These files/folders are not used by a running installation and do not need to be uploaded.

    Release number info

    Please note the following definitions on what each of the digits in our release numbering signifies.

    Since 1.4.7:

    • Change in the first digit of the release represents a major release (e.g. 1.x to 2.x)
    • Change in the second digit represents a feature release (e.g. 1.3 to 1.4)
    • Change in the third digit represents a support release with only bug fixes or smaller features that should not cause any trouble (e.g. 1.4.3 to 1.4.4)

    Prior 1.4.7:

    • Change in the first digit of the release represents a major change (e.g. 1.x to 2.x)
    • Change in the second digit represents a major feature release (e.g. 1.3 to 1.4)
    • Change in the third digit represents a minor feature release with new features and bugfixes  (e.g. 1.4.3 to 1.4.4)
    • Change in the fourth digit represents a support release with only bugfixes (e.g.

    In the case of support releases we expect no compatibility issues with running sites. For all other releases you should review the release announcement to get an idea of possible incompatibilities with third party themes and plugins.

    Support build vs development build

    There are two builds on the Zenphoto download page additionally to the official release:

    1. Support build

    This is also called the master in GitHub terms and represents the next official bugfix/maintainance release. If the current official release is 1.5.7 the support build has generally the version 1.5.8b (b for beta) and continously gets all the fixes to become 1.5.8 later on.

    It may also have a higher version like 1.6b depending on the developlemt plan.

    Generally the support build will be compatible with the official release but it cannot always be guaranteed because of bugfixes and other changes involved. Especially if security fixes require specific changes.

    If you report any issue with the official release we often ask you to try this build to be sure things are really fixed. 

    2. Development build

    Currently there is no development build. If there is this is the development for the next feature release. So if 1.4.4 is the current release stream this will become 1.5.x and will get all the new features we make up.

    Sometimes we ask you to try this as well so we can make sure new features or other improvements are done right. Best don't try this on an important live site as this is work in progress naturally.

    Please note: If we point you to test one of these builds please do so as this helps us to make the next release better. We cannot test all possible server environments so this helps us a lot. Installation is done like regular updates

    Please also visit the Troubleshooting guide

    Creative Commons LicenseThis text by is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

    Code examples are released under the GPL v2 or later license

    For questions and comments please use the forum or discuss on the social networks.

    Related items