What tools respect `.distignore`?
This is file for WP CLI. the command dist-archive: wp dist-archive . Note that you need to install both WP CLI and this plugin: wp package install wp-cli/dist-archive-command
This is file for WP CLI. the command dist-archive: wp dist-archive . Note that you need to install both WP CLI and this plugin: wp package install wp-cli/dist-archive-command
to allow this IP as safe, use this filter add_filter(“http_request_host_is_external”, function ($is, $host, $url) { if (“192.168.0.2” === $host) { $is = TRUE; } return $is; }, 10, 3);
I think setting a cron job to automatically turn permissions on and off might be a bit of an extreme workround 🙂 I think it is probably worth spending the time to set up working permissions on your server, rather than a cron job which could introduce other problems. This has been a good resource … Read more
WP CLI already caches things without needing to use wp core download, that’s why your wp core download command works. You can skip the extraction step entirely by just downloading WP directly into its cache folder, as well as any plugins By default WP CLI will store any files it requests via HTTP in ~/.wp-cli/cache, … Read more
When running the PHPUnit tests, WordPress will load the config from wp-tests-config.php instead of wp-config.php. You need to add your database connection details in wp-tests-config.php. And if you use MAMP or AMPPS to host your database, you will have to use 127.0.0.1 as DB_HOST instead of localhost. Alternatively use the PHP version supplied by the … Read more
On nginx, to block access to the xmlrpc.php file, add this location block to the server block of your configuration file: location ~ ^/(xmlrpc\.php) { deny all; }
Installing wp-cli through Composer is the way to go. For instance: $ cd C:\ $ composer create-project wp-cli/wp-cli –no-dev Copy the path to the bin directory inside the wp-cli directory (something along the lines of C:\wp-cli\bin) Add copied path to the Windows Path variable (tutorial) Exit all CMD’s (or git bash) and reopen them. Now … Read more
There is not “one command” in WordPress CLI that does the job: https://github.com/wp-cli/wp-cli/issues/2270 However using other commands, you can overide the user password directly in the database using the following: USER_ID=$(wp user list –login=”$USR_LOGIN” –format=ids) wp db query “UPDATE wp_users SET user_pass=”$HASHED_PASS” WHERE ID = $USER_ID;” First line is optional if you already know the … Read more
All files and folders should be owned by www-data user and group if not then WordPress can’t change files hence fails to update from dashboard. wp-cli says to use sudo -u www-data -i — wp <command> but that gives This account is currently not available. Why? See this answer: https://askubuntu.com/a/486661/695240 You’re getting the This account … Read more
List all the admins of each site Side note: Dividing these up by site would also be handy. Let’s do that here: We can list the url of each site with: wp site list –field=url We can list all administrators of a given site with: wp user list –role=administrator –url=https://example.tld/site1 These commands can be combined … Read more