Every THT app includes a standalone copy of the THT runtime.
This means you can copy your app files to a remote server and it should work with few, if any, changes.
Here is an example
rsync script to copy files to a remote server:
rsync -azvrW --progress -e "ssh " /local/path/myApp/* email@example.com:/remote/path/myApp/
If you run into any issues, double-check the following:
- Your webserver config is pointing to the correct document root folder.
appdirectory is adjacent to (i.e. a sibling of) the document root.
- Permissions are set on your
appdirectory so the webserver has read/write access. (see below)
Request Routing (Apache)
When you create an app, THT adds an
.htaccess file to your document root folder.
This tells Apache to route all requests to your app for any URL that doesn’t point to a static file.
All THT requests go through the
thtApp.php script in your document root.
Permissions are a common source of errors during deployment.
The user account that your webserver uses will need read & write access to the
For example, on Linux, you might run this command to change ownership of the
app directory to the
www-data (a common user account for Apache):
sudo chown -R www-data app