I deploy a simple project of mine using a horrible PHP script I wrote: <a href="https://github.etsycorp.com/gist/391780" rel="nofollow">https://github.etsycorp.com/gist/391780</a><p>My site is just static files, but it wouldn't actually be that much more complicated if it wasn't. The only thing I'd really need to add would be a line that runs database migrations. You can google "PHP database migrations" to find a handful of libraries that do this, or honestly just make a dummy rails project, and use theirs: <a href="http://guides.rubyonrails.org/migrations.html" rel="nofollow">http://guides.rubyonrails.org/migrations.html</a>.<p>Note that the script I wrote is for a site of mine that gets literally zero traffic (although I'm hoping to get more to it eventually.) If it was something more important, I would probably start moving in the direction of Chef or Capistrano, which are more structured, and have things like error-handling.<p>Regarding stuff you don't want pushed to the site, it sounds like you need to fix your directory structure. It should be something like this:<p><pre><code> project/
..app/
....controller.php
....database.php [etc]
..public/
....index.php
....images/
......some_img.jpeg
....css/
......styles.css
</code></pre>
and then the only directory that should be accessible from the internets is project/public. You deploy the project dir, and serve the site from project/public (so if I go to project.com/index.php, that corresponds to project/public/index.php on the file system.)<p>If you have multiple apps in one repo, you would just have them under project1, project2, then follow the same structure. If you have stuff that doesn't get deployed, it could sit alongside project in a different directory that you don't deploy.<p>For your requires and so on, you should be using relative paths, so that shouldn't be a problem. If you're not using relative paths, you're crazy and you should fix that. (First the being crazy part, then the relative paths part. You should also use an autoloader, so that you're not really manually requiring stuff that much.