![]() ![]() * You can generate these using the secret-key service } * You can change these at any point in time to invalidate all existing cookies. * Change these to different unique phrases! Replace 192.0.2.100 with the database server’s private Authentication Unique Keys and Salts. Sudo cp wp-config-sample.php wp-config.phpĬhange the login variables to match the database and user. Navigate to the directory to which WordPress was extracted, copy the sample configuration and set it to use the remote database: cd /var/www/html//public_html ![]() Configure the initial remote database settings. When first installed and configured through the web interface and a local database, WordPress creates a file called wp-config.php. The web server can now connect to the remote database.Ĭonfigure WordPress to Use a Remote Database Replace 192.0.2.100 with the database Linode’s private IP: mysql -u wpuser -h 192.0.2.100 -p Test remote login with the new remote user. PHP-MySQL is required for WordPress: sudo apt update & sudo apt install mariadb-client php-mysql The web server should already have MariaDB installed. Test the new user’s local login: mysql -u wpuser -pĬonnect to the Remote Database from the Web Server GRANT ALL PRIVILEGES ON wordpress.* TO PRIVILEGES GRANT ALL PRIVILEGES ON wordpress.* TO USER IDENTIFIED BY 'password' Replace 192.0.2.255 with your web server’s private IP: sudo mysql -u root -p Log in to MariaDB as root, create the database and remote user, and grant the remote user access to the database. This example uses UFW to automatically open the port over both IPv4 and IPv6: sudo systemctl restart mysql Restart MariaDB and allow connections to port 3306 through the firewall. Set a root password and respond y to all of the prompts: Run the mysql_secure_installation script to set a root password and remove unnecessary services. Install MariaDB: sudo apt install mariadb-server example_user: Local non-root sudo user.wpuser: The WordPress client database user.: Your fully qualified domain name (FQDN) or IP address.Web server: Linode on which WordPress is downloaded.Database server: Linode on which the database is installed.Visit our guide on how to backup an existing database. While the steps to configure an existing database may be similar, this guide is written for a fresh database and WordPress installation. You will need to configure a LEMP or LAMP stack on one.įollow the Setting Up and Securing a Compute Instance and Secure your Server guides to create a non-root sudo user. This guide uses two Linodes in the same data center to communicate via private IP addresses. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |