Before using DevKinsta, I was using Laragon. I would like to find a similar approach. I’m still on Windows.
To create a new site from Laragon with WP CLI, here is what I could do:
create a new folder (Laragon would detect this new folder and generate a new vhost)
launch an install.sh script sh install.sh which launched the installation of wordpress, generation of the wp-config file, installation of a list of plugins, update of options (deactivation of comments, date format, post_per_page, etc …)
I would like to be able to launch this type of script:
Is it currently possible to create a wordpress site without going through the devKinsta interface? If I create a folder and a wp-config file, how do I find it in the kinsta interface ?
How to launch a .sh script ? Currently I need to connect to the docker container to be able to do this and I don’t know where or how I should put and launch the script.
If the quick creation by script.sh is not possible how to launch at least the sh script without the wordpress/database creation/installation, just for the options update and the plugins installation?
Another question, how to make quick commands to connect to containers and save time?
Is it currently possible to create a wordpress site without going through the devKinsta interface? If I create a folder and a wp-config file, how do I find it in the kinsta interface ?
I don’t see a way/method to create a WP site manually without going through the DevKinsta interface - and then to see that WP site created manually in DevKinsta interface.
Yes, in order to execute that WP CLI (for example to install WP plugin), you can put the commands in a .sh script then execute it through the docker container ( devkinsta_fpm ).
So for example, you may want to do the following:
Create a scripts.sh file (with text editor) inside this folder, let’s say: C:\Users\youruser\DevKinsta\public\sitename
Put the WP CLI into that scripts.sh file (with text editor for example)
you may want to put something like these to test: wp plugin install plugin-name-here wp plugin activate --all --quiet
connect to your devkinsta_fpm docker container: docker exec -u www-data -it devkinsta_fpm bash
once connected in that devkinsta_fpm docker container, you can type: cd /www/kinsta/public/sitename
In this folder, you will see that scripts.sh file you just created before
You can then execute that scripts.sh file with: sh scripts.sh
this will run those 2 WP CLI commands saved in that script.sh file above.
Note:
If you add this line rm -rf wp-content/themes/twenty* in that script.sh, it will be executed as well, and will remove those themes folders/files (e.g.: twentytwenty/ twentytwentyone/ twentytwentythree/ twentytwentytwo/)
For this one:
Another question, how to make quick commands to connect to containers and save time?
You can create a .bat file on your local computer (Windows) which contains that docker command.
For example, you can create a new batch file and name it as: kinsta-fpm.bat
then edit that kinsta-fpm.bat file and add the following lines in it (and save it):
@echo off
docker exec -u www-data -it devkinsta_fpm bash
after that, from the windows CMD / dos prompt, if you run that kinsta-fpm.bat , then it will execute that docker command line.
Like this (see the screenshot) I took on my Windows machine: