$ sudo mv wp-config-sample.php wp-config.php Go the /var/Also, make sure to remove the default Apache index page. Mysql> GRANT ALL ON wp_myblog.* TO FLUSH PRIVILEGES Mysql> CREATE USER IDENTIFIED WITH mysql_native_password BY 'password' Remember to use your own, valid values for database_name, database user, and also use a strong and secure password as databaseuser_password: mysql> CREATE DATABASE wp_myblog Next, set the correct permissions on the website directory, that is give ownership of the WordPress files to the webserver as follows: $ sudo chown -R www-data:www-data /var/www/html/Įxecute the command below and provide the root user password, then hit Enter to move to the mysql shell: $ sudo mysql -u root -pĪt the mysql shell, type the following commands, pressing Enter after each line of a mysql command. Then move the WordPress files from the extracted folder to the Apache default root directory, /var/www/html/: $ sudo mv wordpress/* /var/www/html/ Check PHP Info in Ubuntu Step 4: Install WordPress in Ubuntuĭownload the latest version of the WordPress package and extract it by issuing the commands below on the terminal: $ wget -c You should be able to view the php info page below as a confirmation. When that is done, open your web browser and type in the following URL in the address bar. $ sudo systemctl restart apache2įurthermore, to test if php is working in collaboration with the webserver, we need to create a info.php file inside /var/And paste the code below into the file, save it, and exit. Once PHP and all required extensions are installed, you need to restart Apache to load these new extensions. Last but not least, we shall install PHP and a few modules for it to work with the web and database servers using the command below: $ sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip Secure MySQL in Ubuntu Step 3: Install PHP in Ubuntu Set MySQL Root Password in Ubuntuįor the remaining questions, press Y and hit the ENTER key at each prompt. $ sudo mysql_secure_installationįirstly, you will be asked to install the ‘ validate_password’ plugin, so type in Y/Yes and press Enter and also choose the default password strength level. Once the database server is installed, it is strongly advised that you run a security script to remove insecure default settings and protect your database system. $ sudo apt-get install mariadb-server mariadb-client If you want to install MariaDB, you can install it using the following command. Next, we need to install the MySQL database server by running the command below: $ sudo apt-get install mysql-client mysql-server Note: The Apache default root directory is /var/www/html, all your web files will be stored in this directory. The Apache2 default index page will be displayed in case the webserver is up and running. To test whether the Apache server is running, open your web browser and enter the following URL in the address bar. Once you’ve started Apache, you then need to allow HTTP traffic on your UFW firewall as shown. We need to enable the Apache2 web server to start at system boot time, as well as start the service and verify the status as follows: $ sudo systemctl enable apache2 $ sudo apt-get install apache2 apache2-utils Step 1: Install Apache Web Server on Ubuntuįirst, update and upgrade the software package list and then install the Apache webserver using the following commands. Install LAMP Stack on Ubuntu Serverįirst, we shall uncover the various steps for the installation of the LAMP stack before progressing to install WordPress. In this post, we shall run through the various steps you can follow, to install the latest version of WordPress on Ubuntu 20.04, Ubuntu 18.04, and Ubuntu 16.04 with LAMP ( Linux, Apache, MySQL, and PHP) stack. A dedicated Ubuntu server with a registered domain name, I suggest you go for Linode hosting, which offers $100 credit to try it for free.With millions of plugins and themes available, developed by an active and dedicated community of fellow users and developers, that you can utilize to tailor your blog or website to work and look just the way you want. It is easy to install and learn, especially for persons who do not have prior website design and development knowledge. WordPress is a powerful, free, and open-source, highly pluggable, and customizable CMS that is being used by millions around the world to run blogs and fully functional websites. For those who cannot afford the hustles of developing websites from scratch, there are now several content management systems (CMSs) such as WordPress that you can take advantage of to set up blogs as well as complete websites with a few clicks.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |