How To Install WordPress 3.1 on an Apple TV
All the tools needed are under Links. There is a bug with PDO and WordPress 3.1 which must be corrected. zLib is not supported on the AppleTV so plug-ins and themes etc have to be manually downloaded and copied to their appropriate folders. Read the below fully before attempting the install. Important NOTE WordPress 2.9.2 MUST be installed first then WordPress 3.1 due to the PDO plug-in compatibility problem. Follow these instructions to upgrade to future 3.X versions
1) Download WordPress 2.9.2 and unzip it. SFTP the wordpress folder to /private/var/www/
2) rename wp-config-sample.php to wp-config.php (in /private/var/www/wordpress/)
edit wp-config.php and add this line
define(‘DB_TYPE’, ‘sqlite’);
directly under
define(‘DB_COLLATE’, ”);
( Hint make no other changes as they are not applicable )
3) Download and unzip the PDO plug-in
SFTP the files to /private/var/www/wordpress/wp-content/
4) Change the file permissions /private/var/www/wordpress/wp-content/ to 755 recursively
5) Edit with Textpad NOT notepad /private/var/www/wordpress/wp-content/pdo/db.php
Replace (starting at approx line 116)
function escape($string) {
return addslashes($string);
}
With
function escape( $data ) {
if ( is_array( $data ) ) {
foreach ( (array) $data as $k => $v ) {
if ( is_array( $v ) )
$data[$k] = $this->escape( $v );
else
$data[$k] = $this->_weak_escape( $v );
}
} else {
$data = $this->_weak_escape( $data );
}
return $data;
}
6) http://xxx.xxx.xxx.xxx/wordpress (xxx.xxx.xxx.xxx = Your AppleTV IP Address)
Just answer the questions and it will install
http://xxx.xxx.xxx.xxx/wordpress/wp-admin and login then logout
If you can’t login goto to step 7) If you can login OK goto to step 8)
7) Can’t login fix (it’s rare but it does happen)
Download phpLiteAdmin unzip and put it in /private/var/www/
Edit phpliteadmin.php change the default password and change these lines
“path”=> “database1.sqlite”,
“name”=> “Database 1″,
To
“path”=> “/private/var/www/wordpress/wp-content/database/MyBlog.sqlite”,
“name”=> “MyBlog 1″,
http://xxx.xxx.xxx.xxx/phpliteadmin.php click wp_users > edit > user_pass
Change password ( Must be the MD5 version of your password )
To get the MD5 version of your password click on the MD5 Hash Generator Link
Paste in that password and save
8) Download WordPress 3.1
Unzip and SFTP the wordpress folder to /private/var/www/wordpress (overwrite)
Setup WordPress http://xxx.xxx.xxx.xxx/wordpress/wp-admin
( Remember you have to download themes and plug-ins manually )
Recommended must have plug-in is Quick Cache. Its under Links
NOTE WP Super Cache does NOT work on the AppleTV
9) If you have a registered domain name make sure your site works
http://www.yourdomain.com (before finalizing the WordPress setup)
You can get a free domain name at DynDNS.com for home use
Don’t forget to port forward port 80 on your firewall to the NAT IP of the Apple TV
10) http://xxx.xxx.xxx.xxx/wordpress/wp-admin
goto General Settings and change WordPress address (URL) and Site address (URL)
http://xxx.xxx.xxx.xxx/wordpress to http://www.YourDomain.com/wordpress
Performance Tips
Goto to the Dashboard Under Screen Options unclick all the options except
Right Now Recent Comments Recent Drafts This will greatly speed up the load time
Set Quick Cache Cache Expiration Time to 604800
11) Read the post Important Security Issues Re WP Install
12) Any comments or improvement suggestions would be appreciated.
The posts are moderated and will appear within 24 hours.
Addendum
If you change the IP or Domain Name without changing the WordPress address (URL) and Site address (URL), WordPress will become inaccessible
Click here to find out how to change the WordPress address (URL) and Site address (URL) through SFTP or FTP