If you choose the option to not install WordPress (empty environment) when adding a site, you can install WordPress manually. This is helpful if you want to run an older version of WordPress to test something like a plugin or theme.
Install WordPress Using WP-CLI
Connect to your site’s server with SSH and navigate to the site’s document root:
Download the latest version of WordPress with:
wp core download
Before we can install WordPress, we need to create the wp-config.php file and configure the database settings in it. For that, we’ll need the database name, database username, and database password. These details can be found in your site’s Info tab in MyKinsta.
The following command will prompt you for the database password (more secure than it possibly being stored in bash history). Replace “yourdbname” and “yourdbuser” with your site’s database name and database username from MyKinsta:
wp config create --dbname=yourdbname --dbuser=yourdbuser --prompt=dbpass
When prompted, enter the database password, and your wp-config.php file will be generated.
Now you’re ready to install WordPress. Update the following command with your site’s domain (or temporary URL if you haven’t added a custom domain yet), title, your preferred admin username, and admin email address. When prompted for the password, enter a unique and strong password.
wp core install --url=example.com --title="Your New WordPress Site" --admin_user=youruser --prompt=admin_password [email protected]
Step 5 (Optional)
The core install command installs the latest version of WordPress. If you’d like to downgrade WordPress for testing, use this command, replacing the version number with your desired version:
wp core update --version=5.7.3 --force
You can now head to your WordPress login page (/wp-admin) and log in.
Because WordPress was installed manually, the last step you’ll need to complete is installing the Kinsta MU plugin to ensure your site runs smoothly in our environment.
Install WordPress Using SFTP
Download the version of WordPress you want to install from WordPress.org, saving it where you can easily find it on your computer.
After your download completes, extract the files from the download.
Inside the wordpress folder, rename wp-config-sample.php to wp-config.php and open it with your preferred text editor.
To update the file, we need to first copy the database name, database username, and database password from the site’s Info tab in MyKinsta.
Update the MySQL settings in wp-config.php with those details. Leave the other MySQL settings unchanged.
Next, generate unique WordPress salts with the WordPress.org secret-key tool and update your wp-config.php file with the new salts and save the file.
Now it’s time to upload your WordPress files to your site’s server. To do this, you’ll need to connect to your site with SFTP.
Once you’re connected, navigate into the public folder/directory. Upload the contents of the wordpress folder (but not the folder itself) from your local computer into public on the server. Note: You can skip or delete the readme.html and license.txt files, as these aren’t needed.
The upload may take several minutes, depending on the speed of your internet connection.
To run the WordPress installer, you’ll need to visit your site. From your site’s Domains list in MyKinsta, click the Open URL button next to your Primary Domain.
Visiting your site will show the WordPress installer where you can choose the language for your site and click the Continue button.
Enter your Site Title, Username, Password, email address, and choose whether you want to discourage search engines from indexing your site.
A success message will appear, and you’ll also receive an email with your login URL and username.
You can now head to your WordPress login page (wp-admin) and log in.
The last step you’ll need to complete is installing the Kinsta MU plugin to ensure your site runs smoothly in our environment.