Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrPress committed May 23, 2022
0 parents commit 5589141
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
16 changes: 16 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "piotrpress/wordpress-htaccess",
"type": "composer-plugin",
"license": "MIT",
"description": "This is a webroot directory .htaccess file for setup, in which WordPress is installed in a wp-core directory and wp-content directory is moved outside a core directory.",
"homepage": "https://github.com/PiotrPress/wordpress-htaccess",
"authors": [
{
"name": "Piotr Niewiadomski",
"homepage": "https://piotr.press"
}
],
"keywords": [
"wordpress", "htaccess", ".htaccess", "wordpress-core", "wp-core", "wp-content", "wp-admin", "composer", "apache", "modrewrite"
]
}
19 changes: 19 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2022 Piotr Niewiadomski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
28 changes: 28 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# WordPress `.htaccess`

This is a webroot directory `.htaccess` file for setup, in which WordPress is installed in a `wp-core` directory and `wp-content` directory is moved outside a core directory.

## Installation via `composer.json` file

```json
{
"require": {
"piotrpress/wordpress-htaccess": "^1.0"
},
"scripts": {
"post-update-cmd": "cp vendor/piotrpress/wordpress-htaccess/res/.htaccess ./.htaccess"
}
}
```

## Resources

Check out example implementation in the [piotrpress/wordpress](https://github.com/PiotrPress/wordpress) package.

## Requirements

- Apache Server with `mod_rewrite` module enabled.

## License

[MIT](license.txt)
7 changes: 7 additions & 0 deletions res/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteRule ^((wp-content).*) $1 [L]
RewriteRule ^(.*)$ /wp-core/$1 [L]
</IfModule>

0 comments on commit 5589141

Please sign in to comment.