Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Deploying Your App

This page explains the most common ways to deploy your app to a remote server.


Every THT app includes a standalone copy of the THT runtime.

This means if your server has PHP installed, you can simply copy your app to the remote server and it will usually work without any changes.

However, you will need to install THT on the remote server if you need to run the tht command.

Copying Files 


Here is an example rsync script to copy files to a remote server:

rsync -azvrW --progress -e "ssh " /local/path/myApp/*


You can use an SFTP app to upload the files.

Document Root 

Make sure your webserver is pointing to your app’s public directory as the Document Root.

If you are using a shared hosting provider, this is usually set up via their control panel.


If you run into any issues, you can run tht fix on the remote server.

This will safely update your app and fix some common problems.

$ cd path/to/myApp
$ tht fix

This will:

Manual Troubleshooting

If this does not fix an issue, double-check the following:


Permissions are a common source of errors during deployment.

The webserver’s user account will need these permissions:

If tht fix does not work, you may need to update permissions manually.

For example, on Linux, you might run this command to change ownership of the app directory to the user www-data (a common user account for Apache):

sudo chown -R www-data app

Webserver Configuration 

Shared Hosts

If you are deploying to a shared host, it is probably running Apache with .htaccess enabled, so you shouldn’t need to modify anything.


When you create an app, THT adds an .htaccess file to your public folder.

This tells Apache to route all requests to front.php if the requested URL doesn’t point to a static file.

Make sure Apache is set up to use .htaccess files. Otherwise, you can move the THT routing directives into the main .conf file.


Coming Soon.

It shouldn’t be too difficult to translate the Apache directives to Nginx.

If you set this up, please let us know what worked. :)


Coming Soon.

If you set this up, please let us know what worked. :)

Deploying Updates 

When updating your app, keep in mind that there are some files that you might not want to overwrite.

(In future updates, we will try to make this process a little easier.)