Installing Zend Framework


This article provides instructions on how to implement the Zend Framework onto a shared hosting environment. Please note that this guide does not teach you about the Zend Framework itself.

To proceed with this article, you must have a Shell user enabled and have a basic understanding of the Unix shell. View the following articles for further details:


Here are the objectives:

  • Hackless install, no custom php.ini or messed up redirection in your .htaccess
  • Simple and clean file structure

Installing Zend Framework


Step 1 — creating a new user

View the Users article for details on how to create a new username. When creating it, make sure it’s created as an SSH (Shell) user as this allows you to log into your server to run commands later.

For security reasons, it is best to create a new user account to host the domain. Avoid hosting multiple domains on the same user account at all costs! If a hack compromises your account, all the domains running under that specific username can and will be affected.

Step 2 — creating a fully hosted domain/subdomain

View the following article which walks you through how to add a fully hosted domain to your panel:

Makes sure to assign the newly created Shell user to the domain when adding it.

Step 3 — downloading and extracting Zend Framework through a shell (terminal)

  1. SSH to your user’s home directory.
    [server]$ cd ~
  2. In that directory, run the following command:
    [server]$ wget
  3. View the following page for a full list of available downloads:
  4. Once downloaded, run the following command to extract the contents into a folder called ‘ZendFramework-1.12.15’:
    [server]$ tar -xvf ZendFramework-1.12.15.tar.gz
  5. Run the following command to remove the original .tar.gz file:
    [server]$ rm ZendFramework-1.12.15.tar.gz

Step 4 — modifying the bash profile

  1. View the creating and editing a file via SSH article for instructions on how to edit your existing .bash_profile. Add the following three lines to the end of the file:
    export PATH
    alias zf=$HOME/ZendFramework-1.12.15/bin/
  2. Save and close your .bash_profile.
  3. Disconnect and reconnect to your terminal (SSH) for the profile changes to take effect. You could also run the following command to update it:
    [server]$ . ~/.bash_profile

Step 5 — creating your Zend app

At the terminal (SSH), type the following command (do NOT name your project as a domain name yet):

[server]$ zf create project yourzendapp

A Zend app appears in a new “yourzendapp” folder.

Step 6 — deleting with Symlink

  1. Run the following command through a terminal (SSH) where is your domain:
    [server]$ mv example.com_OLD
  2. Symlink it to the public directory of your Zend app where is your domain:
    [server]$ ln -s yourzendapp/public
  3. Symlink the Zend library into your zend app:
    [server]$ cd yourzendapp/library
    [server]$ ln -s ../../ZendFramework-1.12.15/library/Zend
  4. Visit your domain and you should see the default Zend mainpage.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?