Wednesday, April 28, 2010

SEO - google ignores the meta keywords tag, but others don't...?

As far as google is concerned, keywords in meta tag are out. But, theres still other search engines and indexing services that use them, probably. so dont disregard them just yet, but dont spend hours agonising over them either.
http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html

Description meta they say isn't really used either, except for snippets in the search results, which I read when I search, so better to make them snappy and inviting because they are seen by people. descriptions should be unique to the page.

Whats also scary is that I read that google now takes page load time into account in rankings.... uh oh for large image heavy sites. but hopefully competitors sites are also of similar size, eg photographers would all have big images, right?

Monday, April 26, 2010

wordpress as a cms - dont load parent link in menu, go straight to sub menu item

code is here

you make a page template, and use that page template for your parent page, which is just a redirect. i like this neat redirect style, not plugin based, and your url still has the right heirachy but you dont end up on any boring inbetween pages, or have to use jquery to open and close the menu.

this is a function for use thats a bit smarter, for wider use, such as doing a certain thing if your a child of a certain branch of content...

Saturday, April 24, 2010

Moving wordpress to a new host and to a new domain name tips

Finally worked this out, and was able to move entire wordpress with all posts and settings intact from one host and domain name to a new host and new domain name. It's the first time I've really used phpmyadmin for exported/imported databases aswell.

I wanted to practice moving the whole thing over, so I know what's involved for next time if theres a big mission critical site. Previously I had been just doing fresh install to move sites from testing to live, adding theme / plugins and settings manually, as there usually aren't posts etc for new sites, its still fiddly going into each admin setting page for everything page by page.

Basically I followed the process described here 'Moving wordpress to a new server'

Here's things that tripped me up:

1/ Old server .htaccess: With the downloaded entire wordpress install folder, I also downloaded the old servers .htaccess file and uploaded this to the new server, which caused some funny error where the browser wanted to download the .php file of the page - very dodgy. The .htaccess file was obviously for the specific server that it came from, so it had to be deleted.

2/WP config file/new database setup: Then I got an error when trying to visit the site. Something like 'can't contact database'. In the wp-config.php file, I had used the wrong db user name. On the new server i created a new database, and imported everything using phpmyadmin, but the new server automatically adds a prefix to that username I made, which i didn't realise, so adding the prefix in the config file made it work. I simply hadn't looked in the hosts sql manager to look at the databases listed and their users, and how they were written.
(Also used fantastico on the new server to install wordpress as a test, just incase the server was bungling wordpress, rather than my settings. When it worked via the fantastico install, I downloaded the wp-config.php file and look at the settings it used. This also gave me a hint about the prefixes the server was adding, but mainly I wanted to check that HOSTNAME variable was set right aswell, I had guessed localhost, but some hosts have a special setting.)

3/Permalinks: All my plugins and everything seemed to be there, just as it was, but when i tried to navigate around the site, i get 'not found', because permalinks is screwed. Go to settings > permalinks and you see a helpful little note that your .htaccess file isn't writable. (actually it dosn't exist because as I said I deleted it before). So I make a new one and upload the code from that message and presto, its all working. Also, I see that the offending line then in the old .htaccess file I deleted must have then been "AddHandler php5-script .php"
Its still saying its not writable, so maybe later, look at the correct permisions to set on it, and the other files. http://codex.wordpress.org/Changing_File_Permissions

4/ File download time: The process of downloading all the WP core files twice and uploading took about 4 hours and made the internet slow. I should have done some zipping thing, so the files are zipped before downloading, I'll look up how to do that next time.

Another way to do it, is just to export the wordpress posts etc using the export / import feature in wordpress install. But this dosn't keep ALL settings, so it may or may not be faster/easier (so you do new install on new server etc) http://wordpress.org/support/topic/284535
Depends really. Personally, I just export the XML from dev environment and import to WP install in client's server. Upload customized theme along with a couple or so plugins in new server. Arrange settings and options for plugins as needed and you're done in 30 minutes or so.
In some cases, database export and import is required and I follow these instructions

Further stuff to do when moving domain names:
Also, if the site your moving was a live site , with lost of backlinks to it from out there on the web, you'll loose all those referers unless on your old server you... (from: http://www.wptavern.com/two-wordpress-migration-tips )
Redirect Old domain to New domain (htaccess redirect)
Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
Options +FollowSymLinks

RewriteEngine on

RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
.

Thursday, April 22, 2010

Latency - more important than bandwidth?

interesting to look into, latency increases with international visitors, also on mobile phones.
latency is number of files the page loads (many external CSS stylesheets a bad idea then??)

but then again this is only important for first uncached visit right...?

reckons unicode bullets are good alternative to using images, has list of all the cool unicode characters

adobe meermeer

http://www.sitepoint.com/blogs/2008/12/04/adobe-meermeer-will-change-the-way-you-test-web-sites/

Dreamweaver will have a browser testing screenshots functionality / service attached. Like browsershots service.
I personally don't see the point, testing dosn't mean LOOKING does it, its a browser looking service, not testing.
With most browsers these days pretty good at CSS and IE6's CSS issues easily predictable, little rendering differences are arguably less important than the AJAX fancy stuff that could get broken. If you can't test full functionalities and navigate around the site in the real browser, you just can't tell if its working.
For example, I visited a company's portfolio site the other day in safari 3, I'm guessing the big white box on homepage was meant to be a fancy slideshow, but all i saw was a big white box. DOH!!! epic fail. White box was only thing on the page!

More and more sites, especially minimal portfolio style sites are reliant on fancy Jquery type galleries and effects, or have fancy menus or popups for essential content. If the gallery script fails or is unbearably slow on a certain browser, its just not acceptable to not know about it. I can handle not knowing exactly what typeface konquerer has rendered my body copy in, but I cant handle that if some random nerd happens to find the site that major parts of content are completely inaccessible. Then again said nerd will hopefully understand and empathise...

Mobile Browser Testing - what browsers to test on?

Great list here:
http://www.quirksmode.org/mobile/browsers.html

also, what phones to buy and setup
http://www.quirksmode.org/blog/archives/2010/04/mobile_browsers.html

i just want some emulators an then look on iphone.

this is a cool opera mini emulator... wonder if i should log into something using it online though, prob not.

its a cool browser, it resizes the columns with text wrapping! no need to make extra stylesheet hurrah!

Sunday, April 18, 2010

learning Jquery and PHP resources

looking for a series of easy lessons and tutorials - like a course, to work through when on public transport or waiting around. best if its podcasts, but also would be great if it was interactive with little quizzes and tests to actually try writing, not just watching. wonder if anyone has done this??

jquery book
http://www.manning.com/bibeault/

cool video tutorial series
http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-video-series/

jquery series lessons
http://woorkup.com/2009/10/05/jquery-lesson-series-introduction-to-selectors/