Thursday, May 6, 2010

good learning php resource

short simple lessons explained well

cool site - paid forum for hep with wordpress and bounties

wordpress community is pretty helpful anyway, but this is a cool site that lets people pay others to help them. i know everyone helps people for free, buts its great if you have an urgent question or if you need some extra beer money.

cool if your down with wordpress, you could earn some quick cash replying on these forums when your stuck on public transport or something. or slow on work... or waiting for your client to show up to a meeting, or whatever. wp has a pretty steep learning curve for people not used to php and trying to do special things, so i think itll really take off.
http://wpquestions.com/question/show/id/206

Interesting CSS split a UL into 3 equal columns and keep top heights aligned

use negative margins. i might be using this soon, for a 2 or 3 column menu list
http://www.wpconfig.com/2009/07/28/the-definitive-guide-to-using-negative-margins-2/
referance:
ul {list-style:none;}
li {line-height:1.3em;}
.col2 {margin-left:100px;}
.col3 {margin-left:200px;}
.top {margin-top:-2.6em;} /* the clincher */

More Website speed and optimisation links, http headers

This is basically the caching issue im having, except on safari. something is causing it to redraw randomly, sometimes. the site is a wordpress photography portfolio. but it even redraws on lite pages, like contact, which only has css bacground images. and some text.
http://stackoverflow.com/questions/2182208/css-javascript-caching-properly-wanting-to-prevent-global-page-elements-from-r

this is an interesting troubleshooting method i was considering trying. remove basically all the crap and see what happens then.
"IS my footprint as low as I think it is?"
And so I started removing my external files, one by one. Actually, chunk by chunk. I removed my CSS files, no change. I removed my JS files, change.
So I added my library files back in (MooTools) and the 'persisting' maintained. I added back in some of my plugin files (squeezebox, etc.) and still things looked good.
Then I added sifr back in. This was apparently the culprit.
Circumstantially, ALA and Jessicahische do not use this flash-text replacement library. It makes sense, too: sifr adds

caches
tool to check cache headers

a tutorial on caching

idea- use the ?versionnumber when updating the css or js, but cache it aggressivly.

more tips
1/ clean the css this is new. http://www.cleancss.com/

2/height and width on images - (need to try and alter gallery to do this.

3/ use the trailing slash on links. apparently faster. eg site.com/page/ is better than site.com/page

4/ set appropriate expires http header... gotta find out what this is...

http headers why?? and what?? from: http://www.mnot.net/cache_docs/
Expires headers are especially good for making static images (like navigation bars and buttons) cacheable. Because they don’t change much, you can set extremely long expiry time on them, making your site appear much more responsive to your users. They’re also useful for controlling caching of a page that is regularly changed. For instance, if you update a news page once a day at 6am, you can set the representation to expire at that time, so caches will know when to get a fresh copy, without users having to hit ‘reload’.

This is a really good overview of everything caching, and code examples. great 101. this thing checks the http header for you

general -list not found elsewhere

the ultimate wordpress optimisation guide... and yes its pretty good
nice htaccess example.

using compression
and even better htaccess examples, for different file types.. why seconds and not a year though i wonder...
mentions disabling etags. maybe safari is doing etagging stuff randomly...
i wonder if some of this is all done by wp super cache. really should look into getting the permission right to enable it...

definitive source for cache header examples and other apache speed articles
dont quite get the difference here

this would be a good book to read and 14 basic rules.
its funny how the number
1 is reduce http requests - better get rid of all those different stylesheets for launching...
2 is use a cdn (content delivery network.) what's funny is that the CDN is visibly twice as slow as without a CDN!!! yes, ill admit, im in Australia... but ouch, im not forking out for one of those! twice as slow!
3 is add an expires header, what im working on...

this smart optimiser script sounds pretty cool... it will optimise and add together your css and js and stuff ready to go or something. but CPU overhead is higher.

Design features and options for not using images:
and use of new css properties rather than images... , BUT using those ms filter things.
actually a cool way is listed to do different colour glossy buttons. ive thought of this before but never done it.

ill put this under speed but heres example code for STOPPING plugins loading on pages unless you need them there. something thats been annoying me, eg for gallery scripts, putting all this crap on other pages unessessarily. its a shame this cant be done using page templates, since theres only one header.php template, but whatevs.

im thinking it will need to be if isnot a child of portfolio... remove the script. because portfolio is all different pages. and im seeing its best to avoid listing if about, contact etc, because that limits the cms. less limiting to target specific page parent. unless client renames it but whatevs.

Website Pre-lauch checklist

http://www.gatopanda.com/index.php?option=com_content&view=article&id=54:pre-launch-checklist&catid=36:management&Itemid=59

cool list to go through, i love checklists!

Wednesday, May 5, 2010

why blogger is better than wordpress (self hosted) for beginner bloggers

beginner bloggers, i think should use blogger.com or wordpress.com

self hosted wordpress.org is a whole other kettle of fish

heres some learning curve of topic ive been googling since setting people up on wordpress... joy...

-apache
-.htaccess (you dont want to know)
-server file and folder permissions (ditto)
-security (ditto)
-regular updates. youve GOT to update everything at least once every 3 months, but your better off doing it the DAY that the update is released.
-phpmyadmin
-php. you really cant get far without learning how to say and, not else all of that stuff, unless you find a paid theme that is exactly what you want. mainly, menus and image galleries have required the most investigating. plugins usualy only get you half way there.
-css, but you need that on the other platforms too if you want to change your theme drastically.

basically, hosting something yourself means that you are now the IT GUY, and YOU have to investigate any incompatibilities between wp and your host.

hosting on blogger and wordpress.com, you'll never even think about it.

HOWEVER, if you have money you can pay a web designer to build and install a theme and test it all before you start, with all the features and plugins you need. BUT, you'll probably want to pay them a retainer to keep it all updated.

Sunday, May 2, 2010

random wordpress and seo links

about meta descriptions
http://googlewebmastercentral.blogspot.com/2007/09/improve-snippets-with-meta-description.html
about meta tags generally
http://www.google.com/support/webmasters/bin/answer.py?answer=79812

seo plugins for wordpress
also theres all in one seo but gregs sounds good right now
http://wordpress.org/extend/plugins/light-seo/ evolution of all in one apparently.

random 101

funny article about photo websites having poor seo.
i would counter all this by saying that one client actually didnt WANT to be found on google, because they didn't want 'randoms' contacting them. (such as work experience students, clients with no budget, people after 3 quotes etc etc.)
i sort of agree, theres something premium about not NEEDING web traffic, even not NEEDING a website. it says, im so good, im not desperate for work, etc etc. it communicates exclusivity or something. also, i think it looks a bit desperate and spammy to have proper seo title tags with all those keywords your targeting and so on. for certain industries and services, i dont think its always appropriate, and the correct branding and tone of voice implied by all those little details of content needs to be considered. seoers forget that not everyone NEEDS to be found, they already have loyalty and credibility and their site is sometimes just a portfolio to easily present to clients, an exact replacement for the old heavy book ones, that they personally showcase to clients and agents, but not the entire world. who wants to pay for all that bandwidth anyway for some students too browse or something?
yes designers should be learning seo implications of their work, but web designers shouldnt be over pedantic and forget the brand message of their client, which might include not needing to rank highly, as good 'customers' never come from an online channel, or there is nothing online to 'convert' anyway.

All about Wordpress permissions and security

Im finding it hard to get a straight answer on what is the step by step best ever settings for wordpress install folder and files permissions.

Whe i try and use the wordpress media uploader i get this error message:
"The uploaded file could not be moved to /xx/xx/xx/wp-content/uploads."

Im running into problems on a new host where even though everything seems to be 755, its not letting me upload images, and is asking for the ftp password everytime i install or delete a plugin. Im guessing this is a host specific permissions problem.

While I'm solving this problem, I also want to set all the files and folders to the best most secure permissions so its ready to go when launched.

permissions info generally

I tried to change permissions from dws ftp and it dosnt do anything. so now i have to find out how to cmod

brief look and my files seem to be 644, and folders 755... config is 644, so is ht access. i notice it dosnt have execute access which is probably why wp couldnt write to it??
(whats weird is, the exact same wp installation worked on the old server, has this new server changes the folder permissions??? i dont get it... how? it is the exact same files...
weird uploads in 766, which makes me think i changed it to that, but i try and change it again and it dosnt seem to work, does it take a day to implement?? i change it back to 755, but it not work...
ok so i look in hosts control panel, and the permissions changes i made in dws ftp HAVE taken effect, just dosnt show in dw for some reason!!

Steps I have taken:
1/ I tried making a new folder and ftping it called media and uploading to that rather than uploads. dosnt work right away, i check the permissions and it is 0. even if i make the folder in the ftp program, it is still 0. so, i doubt it should work, need to figure out this chmod thing since dw dosnt seem to change the permissons.

2/going into the hosts cpanel and seeing if i can do any permissions stuff there. yes, and actually, i see that permissions HAVE been changed from dreamweaver, but dreamweaver dosnt show it.

3/ so, i try and upload images to my new media folder which have 777 permisssions. it works. but 777 bad, so i remove and test. 755 - dosnt work. 766, dosnt work.


wordpress forums:
very helpful read reply by SanchoPancho http://wordpress.org/support/topic/253778?replies=39


Directories should have, at most, permissions of 755. If you have a directory that is 777 then that can be written to.

Files should be, at most, 664. If you use the WP editor, you might need these files to be 666 but you really should revert them back to 664 after making any changes. You must never ever have ANY file at permissions greater than 666 unless you are directed specifically to do so.

777
Some hosts will only allow you to upload images (using WP) if the images folder is 777. That leaves your site at a certain level of risk. Email them and check what the minimum permissions are. Despite what they first say, this is NOT a WP issue - it's a security issue.
If your host insists that 777 is the only number, start looking for another host. 755 can be done by hosts (my directories are all 755) that take security seriously.


from wordpress forums:
set the wp-content and folders below it to 777 just for the upload, then change them back to 755
should try this first, just to get past this probelm so can at least get photos in.

also if it turns out only 777 works... see
Host is ok. They changed php rules for this account so that group can write as 775.

Basic links -use these to compile my own summary to go through



From here changing the table prefix to something obscure
http://semperfiwebdesign.com/documentation/wp-security-scan/change-wordpress-database-table-name-prefix/

For some people the database table name prefix changing functionality of WP Security Scan doesn’t work. In that case you may use the following instructions to change it manually.

1. backup your wordpress database to a sql file (you can use phpmyadmin)
2. open that *.sql file (make another copy first) using text editor, then find and replace all “wp_” prefix to “something_”.
3. now, drop all tables of your wordpress databases (don’t drop the database)
4. import the *.sql file which has been edited before into your wordpress databases.
5. and lastly, edit your wp-config.php file and change the $table_prefix = ‘wp_’; to $table_prefix = ‘something_’;
6. you may find that your plugins are deactivated automatically when this happens, so you’ll want to activate them again if that’s the case… I’d recommend deactivating them prior to doing this anyway as a precaution.