WordPress protects against the accidental loss of data.
Protection is in place to prevent the inadvertent deletion of pages and posts, using a trash or recycle bin. Revisions and auto-save help prevent the loss of written content. Plug-ins are available to provide the scheduled backup of files and database.
Revisions
WordPress keeps one or more revisions of the current page or post. To see all of the revisions saved for the posts and pages requires a change to the Screen Options.
Whilst editing a page or post, at the top right of the administration screen click on Screen Options. This will drop down the options for the type of entry being edited. Posts and pages can have different options shown.
With the Screen Options visible click on the check box for Revisions. The revisions for the current post or page are then visible in a section below the content editor.
Revisions allow a prior version of the content to be re-instated, if that wonderfully written paragraph has been deleted, or the progress over time of an entry can be followed or analysed should the specific content on a particular date be required.
By adding a line of code to the configuration file the number of revisions can be limited. If you are using revisions to record the history of the website then amending the number of revisions should not be done. The code below sets the number of revisions to 10 entries. It is added to the file /wp-config.php. define(‘WP_POST_REVISIONS’,10);
Pages
To protect Posts against irrevocable accidental deletion a two step process is implemented. Pages to be deleted are first given a trash status, then from this status it is possible to permanently delete the page.
To manage pages which have been deleted, navigate to the table of pages. At the top there are four links: All; Published; Drafts; Trash. Click on Trash to list these pages.
From the Pages admin navigation option, pages can usually be reviewed. However, the options available for Trashed pages is limited to: Restore and Delete Permanently. Take care when finally permanently deleting a page. Unless you are sure of a pages content, based solely on its name, it may be better to restore the page, review it and then finally delete it.
Prior to deleting a page you may wish to amend its title, if it is similar to another page, and so avoid confusion in the list of trash pages.
To make understanding of the pages in the trash list easier I would recommend keeping the list to a minimum. After a month has passed review the pages listed and delete those which should definitely go. Leaving a page listed for too long your reasons for initially deleting it may have been forgotten.
Posts
Deletion of posts is handled in the same way has the pages. A trash status is applied to deleted posts, allowing them to be reinstated or permanently deleted.
Backups
A number of plug-ins are available to provide backups for the WordPress website. Typically the backup plug-ins target either the database or the files.
WordPress backup plug-ins target the three main sets of files associated with a users content of the website:
- themes
- plug-ins
- general content
When choosing your backup method there are options to save the compressed files to:
- the server site directories
- a service such as Dropbox
- emailed to an address
Saving the content on the server will not protect against accidental loss of the website files, perhaps due to an error with FTP file administration. WordPress backup files can become large and may get rejected by your mail server.
Auto-save
Whilst editing a single auto-save is maintained of the page or post. Only one auto save backup is maintained, over writing the last version. The frequency of the auto-save feature set using a line of code in the file wp-config.php. For a 5 minute interval the code is: define(‘AUTOSAVE_INTERVAL’,3000);
Other Thoughts
Whilst editing the post is covered by all of the above protection, don’t forget that your connection to the website may be lost.
It can be worth keeping an occasional copy of the content in a simple text document. Another approach is to write most of the content remotely using a simple text editor, for example Kate or Notepad. Once the content has been copied into the page content it can be formatted using the editor.
A web page editor, or office suite word processor program such as Writer or Word can be used to create content. However, the content produced by these will be formatted according to their setup. When pasted into the page it will work against the styling of the WordPress theme for the site.
A large database does not respond as responsively as a smaller one. Maintaining a large number of revisions for post and page entries will add to the size of the database. The same is true for many many pages and posts retained as trash.


