Directory structure
/index.php
/wp-config.php
/wp-content/
/project/ 馃憟馃徎 WordPress core, change this name to a non-generic word, e.g. the project slug
/index.php
<?php
/** Tell WordPress to load the WordPress theme and output it. */
define('WP_USE_THEMES', true);
/** Load the WordPress Environment and Template. */
require __DIR__ . '/project/wp-blog-header.php';
/wp-config.php
<?php
// "wp-content" location.
define('WP_CONTENT_DIR', __DIR__ . '/wp-content');
define('WP_CONTENT_URL', 'https://example.com/wp-content');
Update options with WP-CLI
wp option update home "https://example.com"
wp option update siteurl "https://example.com/project"
Login URL: https://example.com/project/wp-admin/
// Don't redirect automatically to admin
remove_action('template_redirect', 'wp_redirect_admin_locations', 1000);
https://developer.wordpress.org/reference/functions/wp_redirect_admin_locations/
Directory structure
/index.php/wp-config.phpUpdate options with WP-CLI
Login URL: https://example.com/project/wp-admin/
https://developer.wordpress.org/reference/functions/wp_redirect_admin_locations/