How to install custom php site and WordPress in ubuntu

How to install custom php site and WordPress in ubuntu digitalocean step by step


WordPress, one of the most popular content management systems (CMS) on the internet currently, allows users to set up flexible blogs and websites using a MySQL backend with PHP processing. WordPress has seen an incredible adoption rate among new and experienced engineers alike, and is a great choice for getting a website up and running efficiently. After an initial setup, almost all administration for WordPress websites can be done through its graphical interface— these features and more make WordPress a great choice for websites built to scale.

In this tutorial, you’ll focus on getting an instance of WordPress set up on a LEMP stack (Linux, Nginx, MySQL, and PHP) for an Ubuntu 20.04 server.

All Command line-

get free 200 dolor 200 dollars free digitalocean Hosting for 2 Month

ip address-

Password- [email protected]

sudo apt update && sudo apt install apache2
sudo ufw allow OpenSSH
sudo ufw allow in “Apache Full”
sudo ufw enable

sudo apt update && sudo apt install mysql-server

sudo mysql_secure_installation

(yyyy) password type =0

[email protected]

sudo apt update
sudo apt install php libapache2-mod-php php-mysql

sudo apt install phpmyadmin php-mbstring

Password [email protected]

sudo nano /etc/apache2/conf-available/phpmyadmin.conf


Alias /dbmyadminlogin /usr/share/phpmyadmin

service apache2 restart
sudo service apache2 reload

sudo mysql

CREATE DATABASE wpmydatabase;

CREATE USER ‘wppostuser’@’localhost’ IDENTIFIED BY ‘[email protected]’;
GRANT ALL PRIVILEGES ON wpmydatabase . * TO ‘wppostuser’@’localhost’;

apt-get update
apt-get install zip unzip

sudo apt-get update
sudo a2enmod rewrite
systemctl restart apache2
sudo nano /etc/apache2/sites-enabled/000-default.conf

past this code after /var/www/html

AllowOverride All

sudo nano /etc/apache2/apache2.conf

Check Kijiye Ye Likha Kaha He None Ke Jaga All Kijiye exmple AllowOverride ALL

Options Indexes FollowSymLinks
AllowOverride None
Require all granted

or iske niche

Options -Indexes

or ak dam niche last me past kijiye

ServerSignature Off
ServerTokens Prod

Symbol Start

Options Indexes FollowSymLinks
AllowOverride All
Require all granted

Options -Indexes

or akdom niche ye.

ServerSignature Off
ServerTokens Prod

Symbol end***

sudo nano /etc/php/7.4/apache2/php.ini
post_max_size = 60M
upload_max_filesize = 60M

sudo chown -R www-data:www-data /var/www
sudo service apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *