23
WordPress! You’re Doing It Wrong WordPress! You’re doing it wrong | 1/23 | www.pantso.gr | @pantso

Word press!you're doing it wrong

Embed Size (px)

DESCRIPTION

A short presentation of problems that both users and developers face while using and developing for WordPress

Citation preview

WordPress! You’re Doing

It Wrong

WordPress! You’re doing it wrong | 1/23 | www.pantso.gr | @pantso

Yet another WordPress guy! (who am I?)

WordPress! You’re doing it wrong | 2/23 | www.pantso.gr | @pantso

My name is Panagiotis Grigoropoulos (although I hear to Panos and Pantso as well), I am a Front-End Designer & Developer and I live in Athens, Greece. I studied Video Game Programming, Application Programming, and I also have a bachelor at Computer Science from Roehampton University of London with a major in Web & Multimedia.

The tools of my trade are HTML, CSS, jQuery, Photoshop and WordPress. I currently work for Atcom S.A and I also maintain GreekTuts.net where I share parts of my knowledge.

Enough about me I’m starting to blush! Let’s move on…

Things you’re doing wrong : 1. The Database Prefix

WordPress! You’re doing it wrong | 3/23 | www.pantso.gr | @pantso

ALWAYS change the Table Prefix.

And don’t be afraid to try something like ifyoucanfindthisthenyouarefreetohackme_

Prefixes can be 1000 bytes long !!!

Things you’re doing wrong : 2. PHPinfo

WordPress! You’re doing it wrong | 4/23 | www.pantso.gr | @pantso

Don’t allow visitors to see your phpinfo.php file.

HOW TO DO IT

Just open your .htaccess file and write the following lines:

<Files php-info.php>Order Deny,Allow Deny from all

</Files>

To allow a specific IP just fill in:

Allow from 123.456.789

Things you’re doing wrong : 3. ReadMe.html

WordPress! You’re doing it wrong | 5/23 | www.pantso.gr | @pantso

Hide the readme.html file, so the visitors won’t know what version you’re running!

Even though most hacker attacks are deployed without scanning for the WordPress version, it can’t hurt being cautious can it?

HOW TO DO IT

Just delete the file readme.html that comes with the WordPress installation and voila!

HOW TO DO IT

Open your theme’s functions.php file and add the following line:

function remove_wp_version() {return '';

}add_filter('the_generator', remove_wp_version ');

If your theme for some reason comes without a functions.php file, just create it!

Things you’re doing wrong : 4. WordPress version

WordPress! You’re doing it wrong | 6/23 | www.pantso.gr | @pantso

For the same reason as the readme.html file, you should also hide the WordPress version from the <head> of your site.

Things you’re doing wrong : 5. Kill the Admin (user)

WordPress! You’re doing it wrong | 7/23 | www.pantso.gr | @pantso

If you already have a WordPress website, and you are not up-to-date with the latest WordPress version, consider removing the Admin user, or simply disable it.

NOTE: For v3.x users this is not necessary since during the installation, WordPress asks for both username and password. Just avoid using the username Admin.

HOW TO DO IT

• To disable the admin user, you will need to first of all have an Administration account (so you won’t get locked out) and then just go to Users panel in the Administration panel, and turn the role of the user with username Admin to subscriber.

• To completely remove the Admin user go to the Users panel in the Administration panel, simply select the user with username Admin and delete it, attributing all posts and links to your account.

Things you’re doing wrong : 6. Use the Editor correctly

WordPress! You’re doing it wrong | 8/23 | www.pantso.gr | @pantso

Many users believe that using WordPress is a walk in the park. And most of them are kinda right! However, why not use WordPress in the way it was made to be used?

Things you’re doing wrong : 6. Use the Editor correctly

WordPress! You’re doing it wrong | 9/23 | www.pantso.gr | @pantso

One of the most annoying things for WordPress theme developers is the post content formatting.

PERSONAL FAVORITE: THE MORE TAG

The more tag is used to create an excerpt of the full post content. Why not use the actual excerpt that WordPress has for us?

Try developing this layout with a post that has an image and some text followed by a more tag in it’s content.

You will have to catch the image and save it, parse and save the text, and then display it the way you want.

NO! Simply open your screen options (right top of the Administration Panel) and enable the post excerpt! WordPress is not Word!

Things you’re doing wrong : 7. Don’t paste from Word

WordPress! You’re doing it wrong | 10/23 | www.pantso.gr | @pantso

WordPress (and almost every CMS on the planet) does not play well with Word formatted text. So stop bringing all of Word’s garbage into your site!

Next time you need to copy/paste content from a Word file, think of using the cute little Word icon in the editor toolbar.

Paste, hit Insert, and you are good to publish!

Things you’re doing wrong : 8. Not Using Featured Images

WordPress! You’re doing it wrong | 11/23 | www.pantso.gr | @pantso

Some people say that everything happens for a reason! In the Featured Images case, that has been going along with WordPress from version 2.9 (known as Post Thumbnail then) and later in version 3.X named Featured Image, the saying is correct!

They do exists, so use them!

WHY USE THEM?

One image to rule them all Easy resizing/cropping Easy upload Facebook friendly (with

og:image) Because it’s there!

Things you’re doing wrong : 9. Ugly permalinks

WordPress! You’re doing it wrong | 12/23 | www.pantso.gr | @pantso

In many cases users don’t mind the URL of their posts. Permanent links is one of the best features in WordPress though! Make them readable, and user friendly!

First structure them correctly, in the Settings > Permalink Settings menu

Things you’re doing wrong : 9. Ugly permalinks

WordPress! You’re doing it wrong | 13/23 | www.pantso.gr | @pantso

And then take good care of them in every new post you make

Things you’re doing wrong : 10. Where is your Feed?

WordPress! You’re doing it wrong | 14/23 | www.pantso.gr | @pantso

WordPress offers the tools to spread the word of what’s going on in your website! Why not harness that power? An RSS feed is the way and you should use it!

Make sure that one of the following URLs works

http://yourdomain.gr/?feed=rss http:// yourdomain.gr /?feed=rss2 http:// yourdomain.gr /?feed=rdf http:// yourdomain.gr /?feed=atom

When using custom permalinks, you should be able to find one of these:

http:// yourdomain.gr /feed/ http:// yourdomain.gr /feed/rss/ http:// yourdomain.gr /feed/rss2/ http:// yourdomain.gr /feed/rdf/ http:// yourdomain.gr /feed/atom/

The title of your pages is very important both to users and to search engines! Give it a little facelift!

As an example, in your theme’s header.php file, try changing this:

<title><?php wp_title(''); ?></title>

to this:

<title><?php wp_title('&raquo;','true','right'); ?><?php if ( is_single() ) { ?> Blog Archive &raquo; <?php } ?><?php bloginfo('name'); ?>

</title>

Or you can try more combinations/information. You can read more at http://codex.wordpress.org/Function_Reference/wp_title

Things you’re doing wrong : 11. Fix your site <title>

WordPress! You’re doing it wrong | 15/23 | www.pantso.gr | @pantso

Things you’re doing wrong : 12. Fix your image alt tags

WordPress! You’re doing it wrong | 16/23 | www.pantso.gr | @pantso

One of the things that people tend not to do, is bothering with image alt tags.Apart from the fact that they are an HTML standard, so their absence instantly means invalid code (for whoever cares), not using them means that you are not helping crawlers “see” your images as part of your content.

Spend some seconds into naming your content images right from the editor.

Just click on an image in your content, click the “Edit Image” icon, and enter an Alternative description.

Things you’re doing wrong : 13. Use the Media Gallery

WordPress! You’re doing it wrong | 17/23 | www.pantso.gr | @pantso

Don’t ever copy paste images from other websites right into the WordPress text editor. First of all you are hot linking and secondly you are not using one of the best features of WordPress! The media gallery.

WHY USE MEDIA GALLERY

All your images in one place Easily create galleries Control image attributes Drag & Drop upload Edit image information Easily edit images Global media control

One of the best things about CDNed scripts is that because many people use them in their websites, many of your visitors may have already downloaded them from visiting another site. Also the speed of a CDN is most of the times faster than your server. Deal with it!

So instead of sending your users the jQuery core file all over again, just give them:

<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.2.min.js"></script>

and instead of making them download your webfont, let them get:

<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

That way you gain, both speed, and you get a big load off your server!

Things you’re doing wrong : 14. Use CDNed Scripts

WordPress! You’re doing it wrong | 18/23 | www.pantso.gr | @pantso

Things you’re doing wrong : 15. Update WordPress

WordPress! You’re doing it wrong | 19/23 | www.pantso.gr | @pantso

We all know it and haveheard it many times!

Well don’t just stand there!

UPDATE NOW!

Things you’re doing wrong : 15. Update WordPress

WordPress! You’re doing it wrong | 20/23 | www.pantso.gr | @pantso

Why update? Keep up-to-date with bug fixes and security patches

Get all the new cool WordPress features Keep hackers away (well at least have a good shot) Stay up-to-date with latest plugin functionality

Close shut plugin security holes Because Google says you should!

More on codex.wordpress.org/Updating_WordPress

AND ALSO…

Things you’re doing wrong : 15. Update WordPress

WordPress! You’re doing it wrong | 21/23 | www.pantso.gr | @pantso

Each time an Admin ignores a WordPress update notification, a kitten dies!

HOW CRUEL CAN YOU BE?

WordPress! You’re doing it wrong | 22/23 | www.pantso.gr | @pantso

THANK YOU FOR YOUR TIME

…and remember!Use WordPress and use it right!

Shameless Promotion

WordPress! You’re doing it wrong | 23/23 | www.pantso.gr | @pantso

www.greektuts.net

Also find me around the web

www.pantso.grfb.com/pantso

twitter.com/pantsodribbble.com/pantso

linkedin.com/in/pantso