ACKNOWLEDGMENT: Most of this post was copied without permission from the original MacWorld post on Jul 27, 2011 by Christopher Breen: http://www.macworld.com/article/161367/2011/07/revert_safari.html because I was afraid to lose this valuable procedure…
If you have a backup that extends back to the time that you had Safari 5.0.x, try restoring it from that backup.
The installer for Safari 5.1 runs a pre-flight script that backs up Safari 5.0.5 before installing 5.1. The backup is located in /Library/Application Support/Apple and is named .SafariArchive.tar.gz. If you unpack this archive, you can recover Safari 5.0.5. There is no need to replace the newer framework files with the older versions. Both versions of Safari can be used side-by-side and run at the same time.
It should be noted that the file, .SafariArchive.tar.gz, is invisible so you may need to un-hide invisible files to find it.
Check the version number after you unpack it. If it is 5.0.5 you are in luck! Just rename that from Safari.app to Safari-5.0.5.app and copy into the /Applications folder.
The first step is to download a copy of the old Safari installer. There is a Snow Leopard version here:
Once you have that installer, you’ll discover that it won’t work via the usual means. Launch it and you’ll be told that it can’t install because the version of the OS you’re using isn’t correct. (It doesn’t matter whether you’re running Snow Leopard or Lion, it won’t install.) Instead, you’ll have to turn to stealthier means in the form of CharlesSoft’s $20 Pacifist (You can run Pacifist in trial mode to do this, but if you find it useful I’m sure Charles would appreciate you paying for it.)
First, toss Safari 5.1 in the Trash. You may need to enter your Administrator’s username and password to do this. Launch Pacifist, click its Open Package button, navigate to the Safari5.0.5SnowLeopard.pkg file you downloaded, and click Open. In the window that appears, select the Contents of Safari5.0.5SnowLeopard.pkg entry and click the Install button at the top of the window. In the sheet that appears make sure that Use Administrator Privileges is enabled and click the Install button. You’ll be asked to enter your Administrator’s username and password. During the installation you’ll be told that some elements of the installation already exist. Choose the Update option.
When the process completes you should have a working version of Safari 5.0.5, which runs under both Snow Leopard and Lion. All the extensions that once worked with Safari should work again.