One thing I love equally as much as WordPress is sharing (my) knowledge. If I’m asked to share my knowledge about WordPress then I’m most definitely winning. Big time. Recently I was asked to speak at WordCamp Sevilla in Spain, which I gladly did. WordCamp Sevilla was a two day event and I got to do a presentation on both days. Fun times for sure.
This post is about the first presentation I did which I dubbed: 10 Things you did not know about WordPress. I’m assuming a lot here, but just roll with me
.
-
Empty Trash Automagically
WordPress will allow you to delete it’s Trash can on set intervals. This is extremely handy when you’ve got clients using your site expecting that hitting delete really means delete. All you have to do is add this piece of code to your
wp-config.php:define( 'EMPTY_TRASH_DAYS', 1 );Obviously the 1 stands for the number of days you intend to keep the deleted posts and pages available in the WordPress trash can.
-
Change Your Autosave Interval
When you’ve worked on a post before and suddenly you’ve lost your internet connection and upon reboot discovered your post was nowhere near as complete as you thought you had, then this solution is for you. WordPress will actually allow you to set the autosave interval to the exact amount of seconds you so desire. Pretty nifty eh? Again,
wp-config.phpcomes to the rescue here. Just add the following code and specify the preferred amount of seconds.define( 'AUTOSAVE_INTERVAL‘, 160 ); -
Edit Images
Most people don’t know this, but once you’ve finished uploading your images to WordPress, there are quite a few things left you can do with said images. A while ago I made a screencast demonstrating some of the possibilities.
-
Maintenance.php
When you update WordPress, WordPress plugins or WordPress themes you, as a visitor, sometimes will notice a notification that the site is currently under maintenance. This notification will be displayed without any style on a white background. Depending on your server setup this message might actually be displayed a few minutes instead of seconds. This, of course, looks awkward. Luckily WordPress allows for you to change how that plain look. All you need to do is create a
maintenance.phpfile and place that in your/wp-content/folder. An example can be found here. Basically, you can use whatever HTML and PHP you like, but no WordPress PHP code as WordPress is not loaded when viewing that page. -
oEmbed
I am amazed how many of you out there are completely ignorant about what I consider one of WordPress’ best media functions. oEmbed allows you to paste a single URL from, for example, YouTube, Vimeo, Flickr in your HTML editor and WordPress will automagically use the embed code and display the rich media according to plan. No need for WordTube kinda WordPress plugins. Just use core. Check the codex page on oEmbed for a full list.
-
Media Settings
Most WordPress installations I come across with don’t make proper use of the Media settings. What I mean with that you can make use of the settings there. For instance, if your max width for a post is 580px you can set your medium width to that width. This way, when selecting to add media via the editor, you can pick a format that will automatically have your images perfectly fitted to the max with of your theme. No need to fiddle around in photoshop beforehand.
-
Use Child Themes
If you’re still not using child themes in this day and age, then you really need to sit down and think this through. There is not easier way to develop, both in effort and time. One of the many reasons I use Genesis as my parent theme framework is because it’s fully optimized for working with child themes. Discover more here.
-
Use the fullscreen mode
WordPress 3.2 came with a beautiful new and improved fullscreen editor. You can find it your TinyMCE menu bar. Go ahead and try it!
-
Screen options. Try them.
One of the things I do by default when handing over a carefully crafted custom WordPress site to my client is making sure his login will show only what is necessary for him. Meaning, I remove everything on each and every single screen WordPress provides that doesn’t need to be there. How you ask? Easy.. just use the Screen Options menu on the right top of your Dashboard. Every single layout will have some options.
-
We’ve got shortcuts.
For all you shortcut lovers out there, WordPress has a bunch of those too. There are shortcuts for WordPress itself, but there are also some additional shortcuts for working in TinyMCE.You can even add your own!
For good measure, my minimal presentation can be found on Slideshare.
Back to you..
Hope you had some fun discoveries reading through this list and feel free to share your own tips in the comment section.
Another good 1 is to revision limit:
define( 'WP_POST_REVISIONS' , 3 );or just turning it off:define( 'WP_POST_REVISIONS ', false );Thanks Travis, those are some cool additions!
As I already said on twitter: Great post, thanks! I didn’t know about 1,2 and 4 – all very useful. There’s always something new to learn
Cheers,
Daniel
Indeed. Always room to learn
Damn, I can’t believe I didn’t know oEmbed… I’m going to uninstall some plugins!
Thanks for the tip!
If your server supports SSL, and you’re worried about security:
define( 'FORCE_SSL_LOGIN', true ); // Use SSL for logins to keep passwords safedefine( 'FORCE_SSL_ADMIN', true ); // Force *all* wp-admin access to be over SSL
If you have plugins that make you bump into PHP memory limits:
define( 'WP_MEMORY_LIMIT', '64M' ); // Or however much you need. Default = 32M, usuallyDid you know you can re-order the images attached to a post by drag-and-drop in the media popup?
Do you know if the screen options apply to only the logged in user or are they global?
I did know about the re-ordering of the images, yes. I’m not sure if your second question is a question to me, but if its is: yes, the screen options are a per user settings. Unless you programmatically change that globally.
Skip wp-content when upgrading to a new WordPress version.
define( ‘CORE_UPGRADE_SKIP_NEW_BUNDLED’, TRUE );
(credit: http://wpengineer.com/2301/advent-calendar-only-update-the-core-the-fast-way/)
“WordPress will allow you to delete it’s Trash can on set intervals. This is extremely handy when you’ve got clients using your site expecting that hitting delete really means delete. All you have to do is add this piece of code to your wp-config.php: define( ‘EMPTY_TRASH_DAYS’, 1 );”
What line nr?
Really doesn’t matter, but I’d place it after the database defines
thanks vry good post.