Skip to content

Commit

Permalink
Remove absolute public directory path
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkla committed Nov 18, 2022
1 parent b0a4fbd commit ca92a71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,7 @@ WP_DEFAULT_THEME=wordplate
<details>
<summary><strong>Can I rename the public directory?</strong></summary>

If you want to rename the `public` directory you'll need to update the `wp-config.php` file in two places:

```php
-realpath(__DIR__ . '/../public');
+realpath(__DIR__ . '/../public_html');
```

Please note that you also have to update your `composer.json` file with your new `public` directory path before you can run `composer update` again.
Update your `composer.json` file with your new `public` directory path and run `composer update`.
</details>
<details>
<summary><strong>Can I rename the WordPress directory?</strong></summary>
Expand Down
4 changes: 2 additions & 2 deletions public/wp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
define('WP_SITEURL', env('WP_SITEURL', sprintf('%s/%s', WP_HOME, env('WP_DIR', 'wordpress'))));

// Set the WordPress content directory path.
define('WP_CONTENT_DIR', env('WP_CONTENT_DIR', realpath(__DIR__ . '/../public')));
define('WP_CONTENT_DIR', env('WP_CONTENT_DIR', __DIR__));
define('WP_CONTENT_URL', env('WP_CONTENT_URL', WP_HOME));

// Disable WordPress auto updates.
Expand All @@ -80,7 +80,7 @@

// Set the absolute path to the WordPress directory.
if (!defined('ABSPATH')) {
define('ABSPATH', sprintf('%s/%s/', realpath(__DIR__ . '/../public'), env('WP_DIR', 'wordpress')));
define('ABSPATH', sprintf('%s/%s/', __DIR__, env('WP_DIR', 'wordpress')));
}

// Set the database table prefix.
Expand Down

0 comments on commit ca92a71

Please sign in to comment.