mkdir my-craft-project
cd my-craft-project/
ddev config --project-type=craftcms --docroot=web --create-docroot
ddev composer create -y --no-scripts "craftcms/craft:^4"
ddev craft install
wsl --install
https://www.docker.com/products/docker-desktop/
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/ddev/ddev/master/scripts/install_ddev_wsl2_docker_desktop.ps1'))
-wsl
sudo apt update
sudo apt install php-cli unzip
cd ~
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
echo $HASH
Output:
e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
composer
sudo apt install php-{common,mysql,gmp,curl,intl,mbstring,imagick,fpm,mysql,pgsql,json,xmlrpc,gd,bcmath,xml,cli,zip}
sudo apt-get install git -y
git config --global user.name "First Last"
git config --global user.email username@ucsd.edu
git config --list
ssh-keygen -t ed25519 -C "your_email@example.com"
ssh -T git@github.com
/opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar
/opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar update
/opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar update verbb/formie
/opt/plesk/php/8.3/bin/php craft setup/db
/opt/plesk/php/8.3/bin/php craft plugin/list
/opt/plesk/php/8.3/bin/php craft plugin/install ckeditor
/opt/plesk/php/8.3/bin/php craft migrate/all
/opt/plesk/php/8.3/bin/php craft clear-caches/all
Do not remove a plugin package with Composer before uninstalling it from the control panel or with Craft’s CLI. Many plugins include special migrations that perform essential database cleanup, and that is only possible if the source code remains at the time it is uninstalled.
This may require a multi-step deployment to ensure plugins have an opportunity to properly clean up after themselves:
composer.json;composer.lock;While there is no inherent danger in a plugin’s tables being orphaned, it can complicate re-installing that plugin, down the line.
/opt/plesk/php/8.3/bin/php craft plugin/disable plugin-handle
/opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar remove plugin-handle (Schau in composer.json)
/opt/plesk/php/8.3/bin/php craft plugin/enable plugin-handle
DDEV
1. ddev craft setup/db
2. ddev craft project-config/rebuild
3. ddev craft utils/fix-field-layout-uids
4. .env -> CRAFT_DB_CHARSET="utf8mb3"
CRAFT_DB_COLLATION="utf8mb3_general_ci"
5. composer.json:
"php": "8.2"
"craftcms/cms": "^5.0.0",
"craftcms/redactor": "^4.0",
"ether/seo": "^5.0.0",
"huttchdev/craft-webpme": "1.1.2",
"verbb/super-table": "^4.0.",
"vlucas/phpdotenv": "^5.4.0",
"xpertbot/craft-wheelform": "^4.0"
6. ddev craft db/convert-charset
7. Remove your database character set and collation settings from .env
8. Replace Charset -> utf8mb4_0900_ai_ci -> utf8mb4_unicode_ci
Putty (Hostfactory)
1. /opt/plesk/php/8.3/bin/php craft setup/db
2. /opt/plesk/php/8.3/bin/php craft project-config/rebuild
3. /opt/plesk/php/8.3/bin/php craft utils/fix-field-layout-uids
4. .env -> CRAFT_DB_CHARSET="utf8mb3"
CRAFT_DB_COLLATION="utf8mb3_general_ci"
5. composer.json:
"php": "8.3"
"craftcms/cms": "^5.0.0",
"craftcms/redactor": "^4.0",
"ether/seo": "^5.0.0",
"huttchdev/craft-webpme": "1.1.2",
"verbb/social-feeds": "^2.0",
"verbb/super-table": "^4.0.",
"verbb/formie": "^3.0.0",
"vlucas/phpdotenv": "^5.4.0",
"xpertbot/craft-wheelform": "^4.0"
6. Remove "craftcms/generator": "^1.3.0", from composer.json
7. /usr/lib/plesk-9.0/composer.phar update
8. /opt/plesk/php/8.3/bin/php craft up
7. /opt/plesk/php/8.3/bin/php craft db/convert-charset
8. Remove your database character set and collation settings from .env
/opt/plesk/php/8.3/bin/php craft clear-caches/all
/opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar dump-autoload