Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suport correct mapping under Multidomain multisites #216

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ DB_HOST=database_host
WP_ENV=development
WP_HOME=http://example.com
WP_SITEURL=http://example.com/wp
DOMAIN_CURRENT_SITE=http://example.com
WP_SSL=on #or off

# Generate your keys here: https://api.wordpress.org/secret-key/1.1/salt/
AUTH_KEY=generateme
Expand Down
7 changes: 6 additions & 1 deletion config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
$dotenv->load();
$dotenv->required(['DB_NAME', 'DB_USER', 'DB_PASSWORD', 'WP_HOME', 'WP_SITEURL']);
}
/**
* Set ssl support for content uploads
* Default: off
*/
$webroot_host = ( getenv('WP_SSL') == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];

/**
* Set up our global environment constant and load its config first
Expand All @@ -34,7 +39,7 @@
*/
define('CONTENT_DIR', '/app');
define('WP_CONTENT_DIR', $webroot_dir . CONTENT_DIR);
define('WP_CONTENT_URL', WP_HOME . CONTENT_DIR);
define('WP_CONTENT_URL', $webroot_host . CONTENT_DIR);

/**
* DB settings
Expand Down