How to install and maintain WordPress on a hosted web server
How to install and maintain WordPress on a hosted web server
Guidance on technical procedures for site administrators using WordPress on our comprehensive web hosting service
Management of WordPress installations on our comprehensive web hosting service generally requires access using SSH. View our How to connect using SSH / SFTP guide for information on suitable clients.
The following guide is a complete but basic installation covering common requirements. The official WordPress site includes full instructions for installing WordPress that cover optional and specialised requirements.
Connect using SSH to access.nsms.ox.ac.uk and login with your site administrator credentials. Then change into the htdocs folder where your site installation should reside:
$ cd <site-name>/htdocs/
We recommend that you create a .htaccess file to restrict access to the site until it is ready to launch. The following example file will restrict access to Oxford networks only:
Require ip 129.67.0.0/16
Require ip 163.1.0.0/16
Require ip 192.76.8.0/26
Download and unpack the WordPress site framework:
$ cd <site-name>/home/
$ wget https://wordpress.org/latest.tar.gz
$ tar xzvf latest.tar.gz --strip 1 -C ../htdocs/
$ cd ../htdocs/
$ mv wp-config-sample.php wp-config.php
Add or amend the following entries in wp-config.php to configure access to your database:
Generate the required security keys and append these to wp-config.php. The recommended way to generate the security keys is using the online security key generator
Use a web browser to visit your site and perform initial configuration as follows:
Select English (UK), continue;
Enter a site name;
Enter an admin username;
Copy the password somewhere safe, or alter it, but keep in mind that by default this login page will be accessible to the whole of the internet, so passwords need to be strong;
Enter your email address;
Select Discourage search engines (so that unfinished sites are not indexed - you can change this later);
Select Install WordPress;
Select Log In;
Enter the admin credentials that you just created
Take a backup of your WordPress site (see earlier guidance)
Check that you are not close to your storage limit
Use the built-in WordPress one-click update. If this works then your upgrade is complete. If it fails then follow the remaining steps to upgrade manually
Disable all plugins, connect to access.nsms.ox.ac.uk and run the following commands:
$ cd <site-name>/home/
$ wget -O latest.tar.gz https://wordpress.org/latest.tar.gz
$ cd ../htdocs/
$ rm -rf wp-includes/
$ rm -rf wp-admin/
$ tar -xzvf ../home/latest.tar.gz wordpress/wp-includes --strip 1
$ tar -xzvf ../home/latest.tar.gz wordpress/wp-admin --strip 1
$ tar -xzvf ../home/latest.tar.gz wordpress/wp-content --strip 1
$ tar -xzvf ../home/latest.tar.gz --strip 1 --no-recursion --wildcards --no-wildcards-match-slash wordpress/"*"
Use a web browser to visit the administration URL for your site (<site-name>/wp-admin/). Click Update WordPress Database
Update all your plugins, and re-enable them. If a plugin or other code cannot be updated or is no longer supported, then consider whether it is safe to use