Last active
March 7, 2024 18:09
-
-
Save szepeviktor/1682e9dee9bd36c8367590020baaa0e9 to your computer and use it in GitHub Desktop.
Installing WordPress core in a subdirectory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// "wp-content" location. | |
define('WP_CONTENT_DIR', __DIR__ . '/wp-content'); | |
define('WP_CONTENT_URL', 'https://example.com/wp-content'); |
// 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/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Login URL: https://example.com/project/wp-admin/