Can’t activate a theme with wp-cli/wp-env … and other questions
- I seem to be able to activate my theme from the wp-env/wp-cli cli. No problems there.
Problem is though, although the command is a success. The theme doesn’t actually activate on localhost even after a hard refresh …
dara@dara-HP-Stream-Laptop-11-y0XX:~/Desktop/haketing/greg@one.ie/my_OLF_git_repo/one$
wp-env run cli wp theme install
./wp-content/themes/twentyseventeen.zip –act ivate ℹ Starting ‘wp
theme install ./wp-content/themes/twentyseventeen.zip’ on the cli
container.Starting 6b391969c505f98f43817f9337c984cf_mysql_1 … ^[[1BStarting
6b391969c505f98f43817f9337c984cf_wordpress_1 … ^[[1BUnpacking the
package… Installing the theme… Theme installed successfully.
Success: Installed 1 of 1 themes. ✔ Ranwp theme install ./wp-content/themes/twentyseventeen.zip
in ‘cli’. (in 16s 894ms)
dara@dara-HP-Stream-Laptop-11-y0XX:~/Desktop/haketing/greg@one.ie/my_OLF_git_repo/one$ wp-env run cli wp theme list
ℹ Starting ‘wp theme list’ on the cli container.Starting 6b391969c505f98f43817f9337c984cf_mysql_1 … ^[[1BStarting
6b391969c505f98f43817f9337c984cf_wordpress_1 … ^[[1BNotice: Trying
to access array offset on value of type null in
phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Theme_Command.php
on line 472 Notice: Trying to access array offset on value of type
null in
phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Theme_Command.php
on line 473 Notice: Trying to access array offset on value of type
null in
phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Theme_Command.php
on line 472 Notice: Trying to access array offset on value of type
null in
phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Theme_Command.php
on line 473 Notice: Trying to access array offset on value of type
null in
phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Theme_Command.php
on line 472 Notice: Trying to access array offset on value of type
null in
phar:///usr/local/bin/wp/vendor/wp-cli/extension-command/src/Theme_Command.php
on line 473
+----------------------+----------+-----------+---------+ |
OneXXXXs-child | active | none | 1.0.0 | |
OneXXXXs | parent | none | 1.0.0 | |
twentynineteen | inactive | available | 1.4 | |
twentyseventeen | inactive | available | 2.2 | |
twentysixteen | inactive | available | 2.0 | |
twentytwenty-child | inactive | none | 1.0 | | twentytwenty
| inactive | available | 1.1 |
+----------------------+----------+-----------+---------+
✔ Ran `wp theme list` in 'cli'. (in 23s 676ms)
Why won’t my theme activate ?
-
Also how do I run wp-cli commands without preceding them with
wp-env cli run
-
Do i have to zip up a theme and run a
rm -rf themes/mytheme/
every time i want to install a theme from wp-cli ? -
Is there a way to just grab the theme from the gitlab repo and not the whole clone WordPress repo ?
Leave an answer
You must login or register to add a new answer .