AHC and ESSL Wordpress Hosting Service

WordPress FAQ

How do I backup my site?

First, make sure you have copies of all files stored in your shared hosting space. Use an sFTP program (such as FileZilla) to download all files.

Next, get a backup of your database:

  1. Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
  2. Log in using your wordpress database credentials (if you’re not sure what these are, open wp-config.php in a text editor – the database username and password should be defined at the top of this file)
  3. Select the database (if you don’t get there automatically) by finding it in the list in the left pane and clicking on it (again, if you don’t know the database name, this is in wp-config.php as well)
  4. Click on the export tab in the right pane
  5. Make sure all tables are selected and tick the box next to “Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT” (leave all the other settings as-is)
  6. Make sure the “Save as file” checkbox is selected
  7. Click on the “Go” button.

You should be prompted to download a file with the same name as your database and the .sql file extension

This “dump” can be used in case something goes wrong in the update process.

For more information, please see the WordPress Backups page in the Codex

How do I restore my site from a backup?

First, replace all the files with your backup (from FileZilla)

  1. Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
  2. Log in using your wordpress database credentials (if you’re not sure what these are, open wp-config.php in a text editor – the database username and password should be defined at the top of this file)
  3. Select the database (if you don’t get there automatically) by finding it in the list in the left pane and clicking on it (again, if you don’t know the database name, this is in wp-config.php as well)
  4. Click on the import tab in the right pane
  5. Select your database dump file to upload
  6. Clkick on the “Go” button

This should replace all tables in your database.

If you see an error message when carrying out the import, it may be because your export does not contain DROP TABLE statements – in this case all the data will be added to the existing tables, which will probably fail at the first query as there will be a duplicate entry for a PRIMARY KEY column. A possible workaround for this is to perform another dump of the database, but this time make sure “Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT” is checked, and dump the structure only (no data). Then import this file (which will delete all tables an re-create them), followed by your original dump.

For more information, please see the WordPress Backups page in the Codex

How can I speed my site up?

The first thing to do is to install a caching plugin such as WP Super Cache. This will create HTML files for pages and posts which are served to users in place of dynamically generated pages (which take longer to process and use up more server resources). The most efficient way of setting up WP Super Cache is to use .htaccess redirects, which requires you to manually add lines to your .htaccess file at the root of your site – the speed benefits you will get from this make the effort well worth it.

Other things you can do relate to the way your theme and plugins operate – the Autoptimize plugin should be able to help with some potential issues – it combines and strips whitespace from scripts and stylesheets added by your theme and plugins, and can strip whitespace from the generated HTML as well. These optimisations can reduce the size of files by around 50%, and because files are combined there will be less requests to the server needed to generate the page. Other major savings of bandwidth can be achieved by optimising image files efficiently – the free Optimzilla service is an online tool which allows you to upload your original images and download compressed versions (other similar services are also available!).

I’ve lost my password!

You can update your password if you have access to MySQL:

  1. Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
  2. Log in using your wordpress database credentials (if you’re not sure what these are, open wp-config.php in a text editor – the database username and password should be defined at the top of this file)
  3. Select the database (if you don’t get there automatically) by finding it in the list in the left pane and clicking on it (again, if you don’t know the database name, this is in wp-config.php as well)
  4. Find the [prefix]_users table (the database prefix is set in wp-config and is usually wp) in the left pane and click on it
  5. Find your user in the table and click on the edit button next to the row to edit the details.
  6. In the user_password field select the “MD5” function from the dropdown next to this field and enter your new password
  7. Click on the “Go” button

I don’t have access to an administrator account on my site – how can I create one?

You can create a user directly in the WordPress database and set them up as a site administrator.

  1. Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
  2. Log in using your wordpress database credentials (if you’re not sure what these are, open wp-config.php in a text editor – the database username and password should be defined at the top of this file)
  3. Select the database (if you don’t get there automatically) by finding it in the list in the left pane and clicking on it (again, if you don’t know the database name, this is in wp-config.php as well)
  4. Find the [prefix]_users table (the database prefix is set in wp-config and is usually wp) in the left pane and click on it
  5. Click on the insert tab to add a new row to the users table
  6. Fill in the fields as follows:
    • ID – leave blank
    • user_login – your username – don’t use “admin” and make it all from lowercase letters
    • user_pass – select the “MD5” function from the dropdown next to this field and enter your chosen password
    • user_nicename – put the same as your user_login in here
    • user_email – put your email address in here (this has to be unique)
    • user_url – leave blank
    • user_registered – leave blank
    • user_activation_key – leave blank
    • user_status – leave blank
    • display_name – put your full name in here
    • spam – leave blank
    • deleted – leave blank
  7. Click on the “Go” button
  8. Make a note of the ID which was generated for your new user – you will need this in the next steps
  9. Find the [prefix]_usermeta table in the left pane and click on it
  10. Click on the insert tab to add two new rows to the usermeta table
  11. Fill in the fields as follows:
    • umeta_id – leave blank
    • user_id – the user ID of your new user
    • First row:
      • meta_keywp_capabilities
      • meta_valuea:1:{s:13:"administrator";s:1:"1";}
    • Second row:
      • meta_keywp_user_level
      • meta_value10
  12. Click on the “Go” button

© Copyright Leeds 2017