ist noch im test !!!!
#!/bin/bash
# Update system
apt update && apt upgrade -y
# Install LAMP stack
apt install -y apache2 mysql-server php libapache2-mod-php php-mysql
# Download and extract WordPress
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
mv wordpress /var/www/html/
# Set correct permissions
chown -R www-data:www-data /var/www/html/wordpress
chmod -R 755 /var/www/html/wordpress
# Create MySQL database and user for WordPress
mysql -u root -p"YourMySQLPassword" << EOF
CREATE DATABASE wordpress;
GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EOF
# Copy WordPress config file and set database connection
cd /var/www/html/wordpress
cp wp-config-sample.php wp-config.php
sed -i "s/database_name_here/wordpress/;s/username_here/wordpressuser/;s/password_here/password/" wp-config.php