DraftCode Help Topics
How can I import files and folders into DraftCode?
How can I rename/copy/delete/zip files or folders?
Do you support external keyboards?
How can I export my files?
What is the database password?
How is the runtime different from apache?
What is the path to my workspace?
Can I configure 'Run' to start with a specific file?
Which PHP extensions are included?
Can you help me understand how to use WordPress, configure phpMyAdmin, etc?
I love DraftCode, how can I help keep it going?
Get in touch...
How can I import files and folders into DraftCode?
Please see options to import files into the default workspace below. Please note that you can use the DraftCode settings panel to change the workspace folder location to any other available folder on your iOS device.
You can import files by:
- Moving the workspace to a shared location like iCloud or a Git App that supports sharing its document folder.
- Choosing "Open in..." from other Apps to "Open in DraftCode"
- Using the document picker inside DraftCode to select a file on one of your locations like iCloud, Dropbox etc.
- Using iTunes File Sharing
- Using PHP to download files into DraftCode's workspace
You can import folders by:
- By using the Apple "Files" App. Select a folder you want to copy to DraftCode, tap "move" and then navigate to DraftCode's workspace under "On My iPad" to copy the folder to the desired location.
- Using iTunes File Sharing
If you want to import a folder from a location that only supports files, we recommend to zip compress your folder, import it, and expand it in DraftCode using the built-in zip/unzip support.
How can I rename/copy/delete/zip files or folders?
You can perform various tasks on files or folders by swiping the file or folder you want to modify.

Swipe left to:
- Delete a file or folder
- Duplicate a file or folder
- Zip a folder or unzip a zip archive

Swipe right to:
- Export/Share a file or folder
- Rename a file or folder
- Execute a file in script mode
Do you support external keyboards?
Yes. The Editor currently supports the following shortcuts:
- Command-Z: Undo
- Command-Shift-Z: Redo
- Command-R: Run
While running PHP you can use:
Please note that as usual, the available keyboard shortcuts are shown when holding the Command key for a few seconds.
How can I export my files?
Please see options to export files from the default workspace below. Please note that you can use the DraftCode settings panel to change the workspace folder location to any other available folder on your iOS device.
You can hand any file or folder in the workspace over to another iOS App or use an Extensions via the standard share button available when swiping right on a file or folder in the file navigation column on the left. This way you can upload to iCloud Drive, DropBox or the FTP App of your choice.
If a destination app does not support folders, simply zip your folder first by swiping left and choosing "zip." and then send the zip file.
If you use WorkingCopy, you can hand over a zip to it and the App will guide you through how the changes should be imported into the repository.
What is the phpMyAdmin database password?
It is the password of your external database.
MySQL is supported in the sense that the MySQL PHP extension is included, but a MySQL database itself is not (and cannot be) included. For offline database work we strongly recommend to investigate using
SQLite3, which is included and does not require an external database server. It is a great SQL database and if your App uses PDO you might be able to simply switch over. The included WordPress package for example runs completely offline using a WordPress SQLite plugin.
How is the runtime different from apache?
From the perspective of your PHP App running inside DraftCode there is no difference or limitation. On iPad you can access DraftCode on other Apps via http://127.0.0.1:8080 while DraftCode is running in Split View. Please note that you can currently NOT access the runtime on other devices on the local network, and that rewrite rules are not currently supported.
What is the path to my workspace?
The path is different on every installation because the workspace is part of the App's sandboxed folder. You can use __FILE__, __DIR__ and similar PHP variables to get to the absolute path of your installation, or alternatively use relative paths.
Can I configure 'Run' to start with a specific file?
Yes. You can use the "star" button in the code editor to mark a file as the starting point for when you hit "RUN" instead of the file you are editing right now. This is useful for larger PHP projects with many files that you might work on but that are not a valid point of execution.
Which PHP extensions are included?
Why don't you include *name of extension*
Here is DraftCode's
PHP 7 phpinfo output,
PHP 7.2 phpinfo output, the
PHP 7.3 phpinfo output, and the
PHP 8.0.9 phpinfo output which shows all currently included extensions. Compiling PHP for iOS is a non trivial task and certain extensions pose significant challenges.
Please get in touch if you need an extension to be supported. It helps us to prioritise what to work on next.
Can you help me understand how to use WordPress, configure phpMyAdmin, etc?
The PHP Apps that are included in DraftCode are identical to their versions you can download from the web, include the same documentation and behave exactly like on any other PHP installation. We have tested them to ensure they work as expected. Please understand that explaining how to configure phpMyAdmin, or how to work with WordPress is not in scope of DraftCode support. Please have a look at the documentation or online forums of these Apps for more information. Thank you for your understanding.
I love DraftCode, how can I help keep it going?
The AppStore is a challenging place for niche Apps like DraftCode. There is a general expectation that Apps should be free or sold at a price less than a cup of coffee. This only works for Apps that are mainstream and have lots of users, or other business models.
You can support DraftCode by spreading the word and rate/review every new version of the App. Getting that new version of the PHP runtime via In-App purchase also helps funding the development.
Get in touch
Please send a message to the e-mail address:
draftcode -at - solesignal.com.