Rules to Better WordPress
If you still need help, visit our WordPress consulting page and book in a consultant.
To share a draft of a post with others you need to install a plugin.
The plugin is called 'Simple Preview' and can be located here.
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 the URL becomes inactive.
- Click on 'Save Draft', then 'Preview'. The post will open in your browser, with the URL that you can share.
Note #1: needing a plugin to share a URL privately, is a little bit crazy.
Note #2: Another solution is ‘Share a Draft’, however it has more options and is more complicated.
It has a time limit function for the post, which allows you to set and extend. The URL it generates is a bit messy.Figure: The URL is pretty messy and it is not as simple as just ticking a box. This is a whole other page
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:
Pushing Staging to Live
By default, only your files will be copied back to LIVE. You can move content by checking the tables you would like to move below. Keep in mind these tables will replace the LIVE version with the STAGING version. So for instance, if you choose to move wp_posts all posts added to the LIVE site since the staging site was created will be removed. However, a checkpoint of your site will be created so you can 'undo' the changes if necessary .
After logging into your live site's /wp-admin click the WP Engine button on the top left-hand side. Then, click the "Staging" tab.
Then, choose from the following options:
When pushing changes from staging to live the file system from staging does not overwrite the live file system but instead, merges with the live file system.
This means any updated files in staging will be updated on live after a push, but any deleted files in staging would not be deleted in live.
If you want to push all changes, except for pages, posts and users to your live site, select all database tables except:
- wp_users and wp_usermeta.
If you push no database tables, only changes to theme files, core WordPress files and plugin files will be pushed to the live site.
If you select all tables, any new posts, pages or users changes made to the live site during your work in the staging area will be overwritten.
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.: http://optimizilla.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".
How to do a "301" redirect in .aspx
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.
Custom Read More Message
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
Some WordPress themes do this automatically
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.