

For the guides linked above, this is the public_html directory. Move the contents of the src/wordpress directory into the root directory defined in your website’s configuration file. If, for instance, you later install a newer version but subsequently need to roll it back, you have a past version stored, and labeled here. Here is an example: sudo mv wordpress-`date "+%Y-%m-%d"`.tar.gzĭoing this, while not required, can be helpful. Rename the tar.gz package in a way that makes it easy to distinguish, such as including the date in the filename. Here and following, the website directory created in the LAMP and LEMP guides linked above is used, which is /var/sudo mkdir -p /var/ You can then use the quit command to exit MySQL.Ĭreate a src directory in your website’s directory, then change into that new directory. * TO 'wpuser' 'localhost' FLUSH PRIVILEGES If you are using a LEMP stack use the below steps:Īdd index.php to the location / block of your site’s configuration file.ĬREATE USER 'wpuser' 'localhost' IDENTIFIED BY 'password' GRANT ALL PRIVILEGES ON wordpress. See what modules are enabled using the below command: sudo a2enmod statusĮnable the rewrite module if it is not already enabled, then restart Apache: sudo a2enmod rewrite If you are using a LAMP stack, make sure the rewrite module is enabled. How to Install the LEMP Stack on Ubuntu 18.04 guide. How to Install a LAMP Stack on Ubuntu 20.04 guide. Additionally, make sure to replace all version numbers in the below guides with the number of the version you are installing. For either stack, make sure that you are installing at least PHP version 7.4. Install and configure a LAMP or LEMP stack. Then, you need to create a database that WordPress can use. To satisfy these requirements, you can set up a LAMP (Linux, Apache, MySQL, and PHP) or a LEMP (Linux, NGINX, MySQL, and PHP) stack.

You also need a webserver to serve the content from WordPress. WordPress runs on PHP and uses MySQL/MariaDB for storing data. If you’re not familiar with the sudo command, see the Commands that require elevated privileges are prefixed with sudo. This guide is written for non-root users.
