Move the WordPress files to your public_html folder: sudo mkdir /var/www/html//public_html/ This will be useful if you install new versions in the future and need to revert back to a previous release: sudo mv wordpress-`date "+%Y-%m-%d"`.tar.gzĬreate a public_html directory to be the root directory for WordPress. Rename as wordpress followed by the date to store a backup of the original source files. Install the latest version of WordPress and extract it: sudo wget Set your web server’s user, www-data, as the owner of your site’s home directory: sudo chown -R www-data:www-data /var/www/html// In this guide, the home directory /var/Navigate to that new directory: sudo mkdir /var/www/html//src/ GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser' Ĭreate a directory called src under your website’s directory to store fresh copies of WordPress’s source files.
How to install curl php extension on ubuntu 16.04 password#
Log in to the MySQL command line as the root user: mysql -u root -pĬreate the WordPress database: CREATE DATABASE wordpress Ĭreate a user and grant them privileges for the newly created wordpress database, replacing wpuser and password with the username and password you wish to use: CREATE USER 'wpuser' IDENTIFIED BY 'password' If you do not have a WordPress database, create one: Make sure MySQL has a database set up for WordPress. The first command will output your short hostname the second, your fully-qualified domain name (FQDN). Setting Up and Securing a Compute Instance guide, and that your Linode’s Replace each instance of in this guide with your site’s domain name.
Remember to include sudo before running your text editor. If you’re not familiar with the sudo command, you can check ourĪll configuration files should be edited with elevated privileges.
Commands that require elevated privileges are prefixed with sudo. This guide is written for a non-root user.