[acc: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:
- Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
- 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) - 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) - Click on the export tab in the right pane
- 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)
- Make sure the “Save as file” checkbox is selected
- 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
[acc:How do I restore my site from a backup?]
First, replace all the files with your backup (from FileZilla)
- Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
- 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) - 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) - Click on the import tab in the right pane
- Select your database dump file to upload
- 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
[acc: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!).
[acc:I’ve lost my password!]
You can update your password if you have access to MySQL:
- Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
- 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) - 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) - 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 - Find your user in the table and click on the edit button next to the row to edit the details.
- In the
user_password
field select the “MD5” function from the dropdown next to this field and enter your new password - Click on the “Go” button
[acc: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.
- Go to http://webhost-tools.leeds.ac.uk/phpmyadmin (you may have to be on campus to do this)
- 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) - 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) - 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 - Click on the insert tab to add a new row to the users table
- Fill in the fields as follows:
ID
– leave blankuser_login
– your username – don’t use “admin” and make it all from lowercase lettersuser_pass
– select the “MD5” function from the dropdown next to this field and enter your chosen passworduser_nicename
– put the same as youruser_login
in hereuser_email
– put your email address in here (this has to be unique)user_url
– leave blankuser_registered
– leave blankuser_activation_key
– leave blankuser_status
– leave blankdisplay_name
– put your full name in herespam
– leave blankdeleted
– leave blank
- Click on the “Go” button
- Make a note of the ID which was generated for your new user – you will need this in the next steps
- Find the [prefix]_usermeta table in the left pane and click on it
- Click on the insert tab to add two new rows to the usermeta table
- Fill in the fields as follows:
umeta_id
– leave blankuser_id
– the user ID of your new user- First row:
meta_key
–wp_capabilities
meta_value
–a:1:{s:13:"administrator";s:1:"1";}
- Second row:
meta_key
–wp_user_level
meta_value
–10
- Click on the “Go” button
[acc:END]