Rules to Better WordPress - 7 Rules
Want performance, security, and ease of use? Check SSW's WordPress consulting page.
To share a draft of a post with others you need to install the plugin called 'Public Post Preview'.
Once you have plugin installed, all you need to do is enable it and then follow the steps below:
- In the 'Edit Post' page, scroll down below your HTML panel to the 'Preview' panel, and select the tick box "Allow Anonymous Preview".
Once enabled, it will create a preview link, that you can send to as many people as you like.
Note: Once you publish the post that URL becomes inactive.
- Click on 'Save Draft', then 'Preview'. The post will open in your browser, with the URL that you can share.
It has a time limit function for the post, which allows you to set and extend. The URL it generates is a bit messy.
Note: Needing a plugin to share a URL privately seems a little bit crazy.
Note: Another solution is ‘Share a Draft’, however it has more options and is more complicated.
Backing up your WordPress site is important and while most hosting providers will perform backups on your behalf, it doesn’t hurt to have another copy tucked away safely. For this purpose we use and recommend the BackWPup WordPress plugin.
It simplifies WordPress backups and can be configured to back up your site to:
- FTP server
- Amazon S3 services
- Microsoft Azure
We setup our WordPress sites to backup daily to Dropbox:
For more information head over to: https://wordpress.org/plugins/backwpup
If you ever need to create a new post to your blog without access to WordPress admin area ** ** ( /wp-admin ) ** ** y ou can do it via email, t hanks to the Jetpack plugin. Watch how you do it on Ben Cull's video:
A nice looking image can be harmful to your website if it's not optimized. It's important to optimize images for the web because the fewer bytes the browser has to download, the less bandwidth the client uses, and the faster the browser can download and render your content on the screen.
The first thing is to save your graphics in the right format and size. After that, you should run an image optimizer.
Some tips and techniques to keep in mind as you work on optimizing your images:
- Don't be afraid to dial down the "quality" settings if the results are very good and byte savings are significant
- Remove unnecessary image metadata like geo information, camera information, and so on
- Use automated tools to ensure that all of your images are always optimized (E.g. imagecompressor.com/
If your website is running on WordPress you should install and activate the plugin WP Smush. It scans every image you upload – or have already added to your site – cuts all the unnecessary data and scales it for you before adding it to your media library.
Extensive caching can complicate things if you’re working on your site and expecting to see changes immediately on the frontend. Purging cache is an essential part of the development process.
WPEngine - After you make a change on any WordPress site:
- Log in to your website’s wp-admin dashboard
- Click on the WP Engine plugin tab
- Scroll down, click Purge All Caches
More information: https://wpengine.com/support/cache/#Purge_Server_Caches
Don't lose your Google juice when you rename a file. Do not use META refresh to redirect pages - "301" code is the most efficient and Search Engine Friendly method for webpage redirection. There are different ways to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, always use the code "301", which is interpreted as "moved permanently".
Any time you move a page or just delete a page you should add a "301" redirect to a new page or a page for missing pages.
You can add a 301 redirect in code:
<% Response.RedirectPermanent("NEW PAGE URL HERE") %>
Although this works well it is difficult to manage the list of redirects and you need to keep the page around.
- You can write an HTTP handler
This is better as you can choose where to store the redirect list, but you still need to manage a custom codebase.
- You can use rewrite maps in IIS URL Rewrite to add a number of redirects
See Storing URL rewrite mappings in a separate file for an explanation of how to use rewrite maps.
Note: If you are using a source control, like TFS, lock the old file so no-one can edit it by mistake.
WordPress automatically redirects posts when you change the URL (permalink). No further action is required.
By default, WordPress shows the whole article content on a post list. Knowing that some posts are quite long - taking a lot of real estate on the page - it's a good idea to summarize it and add a "read more" link.
You can split your blog entries so that only the first part of certain posts is displayed on the home and archive pages. When you do this, a link will be placed after the intro, pointing the reader to the full post.To do so, you can either edit the source index.php (or similar) file; or just click the "Read More" tag button in the first row of the visual editor toolbar (or press Alt+Shift+T ):
replace <?php the_content(); ?> with <?php the_excerpt(); ?>
Figure: Bad example - changing source PHP files is complicated and require developer skills
Note: This is out-of-the-box with WordPress. You won't need a plugin.
To customize the message, simply add a space after <!--more and insert the text you want to show:
<!--more Read the full post -->
Figure: Custom "read more" link
Many WordPress themes will have an option to not show the full blog content on the homepage. E.g. in Avada (one of the most popular themes) it has this:
Always check theme options before going back through posts to add in the Read More tags manually.