https://github.com/themeplate/application
For building a modern WordPress site
https://github.com/themeplate/application
wordpress wordpress-development wordpress-php-library wordpress-site
Last synced: 4 months ago
JSON representation
For building a modern WordPress site
- Host: GitHub
- URL: https://github.com/themeplate/application
- Owner: ThemePlate
- License: gpl-3.0
- Created: 2022-05-05T21:41:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-31T13:58:35.000Z (about 1 year ago)
- Last Synced: 2025-05-12T14:36:11.197Z (about 1 year ago)
- Topics: wordpress, wordpress-development, wordpress-php-library, wordpress-site
- Language: PHP
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ThemePlate Application
## Usage
### `./vendor/bin/themeplate install`
### wp-config.php
```php
use ThemePlate\Application\Core;
use Env\Env;
require_once 'vendor/autoload.php';
Core::setup( __DIR__ ); // .env location
$table_prefix = Env::get( 'DB_PREFIX' ) ?: 'wp_';
require_once ABSPATH . 'wp-settings.php';
```
### .env
```dotenv
## Relative to this .env file
# PUBLIC_ROOT='public'
## Relative to the PUBLIC_ROOT
# WP_CORE_DIR='wp'
# CONTENT_DIR='content'
WP_HOME='https://themeplate.local'
# DB_NAME='local'
# DB_USER='root'
# DB_PASSWORD='root'
# DB_HOST='localhost'
# DB_PREFIX='wp_'
# DB_CHARSET='utf8'
# DB_COLLATE=''
WP_DEBUG=true
# WP_DEBUG_LOG='/path/to/debug.log'
# WP_ENVIRONMENT_TYPE='local'
# WP_DEFAULT_THEME='themeplate'
# DISABLE_WP_CRON=true
# DISALLOW_FILE_MODS=false
# Authentication Unique Keys and Salts
AUTH_KEY='generateme'
SECURE_AUTH_KEY='generateme'
LOGGED_IN_KEY='generateme'
NONCE_KEY='generateme'
AUTH_SALT='generateme'
SECURE_AUTH_SALT='generateme'
LOGGED_IN_SALT='generateme'
NONCE_SALT='generateme'
```
## Structures
### Default
```
├── public/
│ └── content/
│ │ ├── mu-plugins/
│ │ ├── plugins/
│ │ ├── themes/
│ │ └── uploads/
│ ├── wp/
│ └── index.php
├── vendor/
└── composer.json
└── wp-config.php
```
#### index.php
```php
define( 'WP_USE_THEMES', true );
require __DIR__ . '/wp/wp-blog-header.php';
```
### Modern
```
├── public/
│ ├── mu-plugins/
│ ├── plugins/
│ ├── themes/
│ ├── uploads/
│ ├── index.php
│ └── ... WP CORE files
├── vendor/
└── composer.json
└── wp-config.php
```
#### .env
```dotenv
...
WP_CORE_DIR='/'
CONTENT_DIR='/'
...
```