7. Static Export
Prev | Chapter 5. Control Panel | Next

## 7. Static Export

MeshCMS offers an option to export a static copy of the site. That copy can be served by any HTTP server (e.g. Apache) without the need of a Java Servlet container. For example, you could use static export to edit a site in the Intranet using a local Tomcat, then publishing the site on an external server at any time.

Please note that the lack of a servlet container means that modules that require server interaction (like Mail and Comments) won't work as expected. All others will work since their content (e.g. gallery thumbnails) will be generated while exporting.

To perform a static export, some parameters must be specified:

- URL to get the home page: needs to be explicitly set when the local URL is different from the external one. For example, suppose that your Tomcat is running on a machine named localserver, and that its firewall redirects connections to port 80 to Tomcat, which is running on port 8080. In such a situation, you will access Tomcat externally at `http://localserver/`, while the static export (which accesses pages from the server itself) must use `http://localserver:8080/`, or `http://localhost:8080/`. In this case, the local URL must be specified;

- Destination directory: the local path of the exported copy, i.e. where the site will be exported (required);

- Check for files that do not need to be updated: if checked, files already exported are not copied again. This works for files whose modification time is newer in the target directory. Please note that pages are always re-exported, since changes could be in generated parts, like menus or modules;

- Command to be executed after export: an optional command that can be run when the export is completed. This is a shell command to be executed in a process and could be used to sync the exported site on a FTP connection. As a trivial example, you could use sh -c 'ls -R /my/exporting/dir' or cmd /c "dir /s C:\my\exporting\dir" to get a list of exported files.

Prev | Up | Next
6. Site Synchronization | Home | 8. Site Manager