paulbunyannet / wordpress-artisan
用于与Wordpress交互的Artisan命令
1.9.0
2024-07-24 13:40 UTC
Requires
- php: ^8.2
- illuminate/console: ^11.0
- illuminate/filesystem: ^11.0
- illuminate/support: ^11.0
Requires (Dev)
- fakerphp/faker: ^1.9.2
- mockery/mockery: ~1
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^11.0
Suggests
- jgrossi/corcel: Needed for using wp:clear-cache command. See https://github.com/corcel/corcel for instructions.
README
wp
wp:down Put Wordpress in maintenance mode
wp:keys Generate Wordpress Authentication keys
wp:up Bring Wordpress back out of maintenance mode
wp:clear-transient-cache Clear all the transient caches from the database
配置
运行 php artisan vendor:publish --provider="Pbc\WordpressArtisan\WordpressArtisanServiceProvider" --tag="config" --tag="lang"
以获取配置和语言文件,然后根据需要进行更新。
命令
Wordpress维护
将Wordpress置于维护模式。
用法
php artisan wp:down
将WP置于维护模式
php artisan wp:up
将WP从维护模式中恢复
Wordpress密钥
构建Wordpress认证密钥并将其应用到.env文件中,类似于在https://api.wordpress.org/secret-key/1.1/salt/ 生成的密钥
用法
php artisan wp:keys
生成新的密钥
Wordpress清除临时缓存
清除数据库中的所有临时缓存。需要安装并配置 https://github.com/corcel/corcel。
用法
php artisan wp:clear-transient-cache
清除数据库中的临时缓存
路线图
添加其他有用的Artisan命令以与Wordpress交互。如果您有想法,请提交PR。
许可证
wordpres-artisan软件包是开源软件,许可协议为MIT协议