Please note that these documents apply to OpenShift Online v2 only (accounts created before August 1st, 2016).
If you are using one of the OpenShift 3 products, please refer to documents available at

PHP Template Repository Layout

index.php              Template PHP index page
.openshift/            Location for OpenShift specific files
    action_hooks/      See the Action Hooks documentation (1)
    markers/           See the Markers section below
    pear.txt           List of pears to install (2)
1 Action Hooks documentation
2 A list of pears to install, line by line on the server. This will happen when the user does a git push.

Document root

Apache DocumentRoot, the directory that forms the main document tree visible from the web, is selected based on the existence of a common directory in the repository code in the following order:

1. php/          # for backward compatibility with OpenShift Origin v1/v2
2. public/       # Zend Framework v1/v2, Laravel, FuelPHP, Surebert etc.
3. public_html/  # Apache per-user web directories, Slim Framework etc.
4. web/          # Symfony etc.
5. www/          # Nette etc.
6. ./            # Drupal, Wordpress, CakePHP, CodeIgniter, Joomla, Kohana, PIP etc.

PHP include_path

The following application directories, that might exist in the repository code, are added to the PHP include_path and thus automatically searched when calling require(), include() and other file I/O functions:

- lib/
- libs/
- libraries/
- src/
- misc/
- vendor/
- vendors/