Skip to content

PHP-Based Workspace Types

Several workspace types are available for PHP applications — including Magento 2, Laravel, Shopware, and others. These appear as distinct types in the workspace creation wizard because each requires a different web server configuration (URL rewrites, entry points, static asset handling). However, they all share the same underlying shell environment and tooling described below.

The web server (Nginx or Apache) is configured to pass requests to PHP-FPM for processing. Each workspace type has server rules tailored to its framework’s routing and directory structure. Selecting the correct type ensures the web server handles your application’s URLs properly.

When you SSH into a PHP workspace, the following tools and paths are pre-configured:

Terminal window
# Check PHP version
php -v
# Run a PHP script
php script.php
# Check loaded modules
php -m

The PHP version matches what was selected during workspace creation. Multiple versions are not available simultaneously — the configured version is the one used by both the CLI and the web server.

Multiple Composer versions are installed side-by-side. The workspace’s configured default version is symlinked as composer, but you can invoke any specific version directly:

Terminal window
# Use the configured default
composer install
# Use a specific version explicitly
composer1 install # Composer 1.x
composer2 install # Latest Composer 2.x
composer2.2 install # Composer 2.2.x
composer2.3 install # Composer 2.3.x
composer2.7 install # Composer 2.7.x

Available binaries: composer1, composer2, composer2.1, composer2.2, composer2.3, composer2.4, composer2.5, composer2.6, composer2.7, composer2.8, composer2.9.

Node.js and npm are available in PHP workspaces for frontend asset builds:

Terminal window
node -v
npm -v
# Install frontend dependencies
npm install
# Run build scripts
npm run build

Beyond PHP and Composer, the following tools are available out of the box:

ToolCommandPurpose
WP-CLIwpWordPress management
n98-magerunn98-magerunMagento 1 CLI utility
n98-magerun2n98-magerun2Magento 2 CLI utility
Shopware CLIshopware-cliShopware development CLI
AWS CLIawsAWS service management
Kiro CLIkiroAI-assisted development
MySQL clientmysqlDatabase access
PostgreSQL clientpsqlDatabase access
MongoDB ShellmongoshMongoDB access
GitgitVersion control
jqjqJSON processing
rsyncrsyncFile synchronization
Terminal window
# Navigate to project root
cd /home/web/html
# Run Magento CLI
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
# Reindex
php bin/magento indexer:reindex
# Check module status
php bin/magento module:status

Database access:

Terminal window
mysql -h db -u root -p $WORKSPACE_DB_NAME

Redis (if enabled):

Terminal window
redis-cli ping
redis-cli flushall

Elasticsearch / OpenSearch:

Terminal window
# Check cluster health
curl http://db:9200/_cluster/health
# List indices
curl http://db:9200/_cat/indices?v
Terminal window
cd /home/web/html
# Artisan commands
php artisan migrate
php artisan cache:clear
php artisan config:cache
php artisan queue:work
# Run tests
php artisan test
Terminal window
cd /home/web/html
# Shopware CLI
php bin/console cache:clear
php bin/console plugin:refresh
php bin/console plugin:install PluginName
php bin/console plugin:activate PluginName
php bin/console dal:refresh:index
php bin/console theme:compile
# Shopware CLI tool
shopware-cli project ci
Terminal window
cd /home/web/html
# WP-CLI commands
wp core version
wp plugin list
wp plugin update --all
wp theme activate theme-name
wp cache flush
wp search-replace 'old-url.com' 'new-url.com'
wp db export backup.sql

When creating a workspace, you can choose Clean Install to automatically install a fresh copy of your application. The wizard presents version options specific to each workspace type.

PlatformUsernamePassword
Magento 2 / Adobe CommerceadminOrdin@Dev1
WordPressadminOrdin@Dev1
Shopwareadminshopware

Available versions: 2.4.6, 2.4.7, 2.4.8, 2.4.9 (both Enterprise and Open-Source editions).

The clean install process:

  1. Runs composer create-project from the Magento repository
  2. Executes bin/magento setup:install with database, search engine, and URL configuration
  3. Runs indexer:reindex
  4. Sets developer mode
  5. Symlinks pub/ to the web root

Requirements: An auth.json file must exist in /shared/ with your Magento repository credentials. Place it there before creating the workspace.

Available versions: 6.5, 6.6, 6.7.

The clean install process:

  1. Runs composer create-project shopware/production
  2. Installs dev tools
  3. Configures .env.local with database, OpenSearch, and URL settings
  4. Runs bin/console system:install --basic-setup
  5. Indexes with OpenSearch
  6. Symlinks public/ to the web root

Available versions: latest, 6.6, 6.7.

The clean install process:

  1. Downloads WordPress core via wp core download
  2. Creates wp-config.php with database credentials
  3. Runs wp core install with site URL and admin credentials

Ordin automatically injects environment variables into the workspace to pass configuration values to your application. These are set by the platform based on your workspace and project settings — you don’t manage them directly.

Commonly used variables:

VariableExampleDescription
WORKSPACE_DOMAIN_1mysite.project.ordinlabs.ioPrimary workspace URL
WORKSPACE_DB_HOSTdbDatabase hostname
WORKSPACE_DB_NAMEworkspace_abcDatabase name
WORKSPACE_DB_USERrootDatabase user
WORKSPACE_DB_PASSWORD(set automatically)Database password
WORKSPACE_NAMEmysiteWorkspace subdomain

Your application code and config templates can reference these to connect to services without hardcoding values. See Workspace Config Templates for the full list.

Terminal window
curl -H "Host: $WORKSPACE_DOMAIN_1" http://localhost
Terminal window
# PHP-FPM error log
tail -f /var/log/php-fpm/error.log
# Web server access/error logs
tail -f /var/log/nginx/error.log
tail -f /var/log/apache2/error.log

Cron is managed by the workspace. To run a cron command manually:

Terminal window
# Magento cron
php bin/magento cron:run
# Laravel scheduler
php artisan schedule:run
/home/web/
├── html/ # Web root (application code)
│ ├── composer.json
│ ├── pub/ # Magento public directory
│ └── ...
├── .bashrc # Personal shell config
└── .workspacerc # Workspace-specific config
/shared/ # Shared across project workspaces
├── .profile # Project-wide shell profile
├── .bashrc # Project-wide bash config
├── bin/ # Shared scripts (in $PATH)
└── startup.d/ # Scripts run on environment start