In this week’s feature highlight, we look at How to Install WordPress on Ubuntu 22.04
WordPress is one of the most popular website-building tools available out there. It is a simple way to get your online presence and perfect for those who do not know how to code and want a simple and effective way to share and build your story on the internet.
Next, create a new MySQL user account that we will use to operate on WordPress’s new database, with the username “wordpress_user”.
CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'password';
Link the user and DB together by granting our user access to the database.
GRANT ALL PRIVILEGES ON wordpress_db.* to wordpress_user@'localhost';
Flush the privileges so that MySQL knows about the user permissions we just added.
FLUSH PRIVILEGES;
Exit out of the MySQL command prompt by typing.
exit
Output:
root@crown:~# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 81
Server version: 10.6.7-MariaDB-2ubuntu1 Ubuntu 22.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE wordpress_db;
Query OK, 1 row affected (0.003 sec)
MariaDB [(none)]> CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.005 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpress_db.* to wordpress_user@'localhost';
Query OK, 0 rows affected (0.003 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.003 sec)
MariaDB [(none)]> exit
Bye
In this week’s feature highlight, we look at How to Install Magento with LAMP Stack on Ubuntu 21.10
Magento is an e-commerce platform built on open source technology that provides online merchants with a flexible shopping cart system, as well as control over the look, content, and functionality of their online store. Magento offers powerful marketing, search engine optimization, and catalog-management tools.
Let us begin with creating a Database and a user. We will then grant the required privileges to the user so it can interact with the Database.
You should create a database with the name magento2 for all.
mysql -u root
CREATE DATABASE magento2;
CREATE USER 'magento2'@'localhost' IDENTIFIED BY 'password_crowncloud';
GRANT ALL PRIVILEGES ON magento2.* TO 'magento2'@'localhost';
FLUSH PRIVILEGES;
EXIT
The above commands will give complete access to the user magento2. We would suggest using a strong and long password.
Configure PHP Settings for Magento
Configure PHP Memory Limit, Post max size, and Upload max filesize. You can change the limit as per your need.
sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php/7.4/apache2/php.ini
sed -i 's/post_max_size = .*/post_max_size = 256M/' /etc/php/7.4/apache2/php.ini
sed -i 's/upload_max_filesize = .*/upload_max_filesize = 512M/' /etc/php/7.4/apache2/php.ini
Enable Apache module if not already enabled then restart the Web Server.
a2enmod php7.4
systemctl restart apache2
Configuring Apache vHost
Now, create a new Apache configuration file dev.domainhere.info.conf for Magento with the following command.
Replace dev.domainhere.info with the domain name of your own for all the below code examples:
vi /etc/apache2/sites-available/dev.domainhere.info.conf
Now, press i to go to INSERT mode and type in the following lines of codes in the dev.domainhere.info.conf file.