Categories
Databases How-To MySQL WebApps wordpress

How To Back Up WordPress with mysqldump

Here’s a quick how to:

1. Tar up the directory:

tar cvf WordPress.tar wordpress/.
bzip2 WordPress.tar

2. Dump the database.

mysqldump --user user_name --password --host example.com --extended-insert=FALSE database_name > database_name.sql

I personally use extended-insert set to false because I often have to read the SQL.

Here is how to restore from backup:


tar zxvf WordPress.tar.bz
mysql --user user_name -p -hexample.com database_name < database_name.sql

Be sure to replace user_name, example.com and database_name with the appropriate values for your system.

I hope this helps.

Categories
php wordpress

How Do You Explain WordPress? Use Ruby Metaphors!

Last night I went to the WordPress Meetup at the Automattic office on Pier 38. I was late, but thank goodness that their sponsors had free booze and pizza.

What struck me about this meetup was how folks explained WordPress and how to do production pushes with it.

They had to use Ruby best practices metaphors.

This is a dramatic change from 5 or 6 years ago when the opposite was the case.

How do you push to production? “It’s like using Capistrano.”

How does WordPress.com push code to production? “We use SVN with no branches. It’s like git without the merging.”

What if you wanted to do RSpec / TDD? “Use something like Simpletest to exercise the user tables?”

There was no automated solution for what to do with serialized data, and pushing that serialized data from dev to stage to prod if said data contained a different FQDN for each environment.

Categories
Social Media TechBiz wordpress

Microsoft moves Blogs to WordPress

At the TechCrunch Disrupt event today, Twitter user, @bigs, broke the news that Microsoft announced that it would be moving over 30 million users of their Live blogging service to WordPress.

As a WordPress expert that has had to work on WordPress in a Windows environment there is one big gotcha: character encoding.

Here are what common characters look like when they are moved from a Windows environment to WordPress:

a return: ^M
single-quotes: ?~@~Y
asterisk: ?~@?
double-quotes: ?~@~\ or ?~@~]

If the WordPress migration process is robust, then it will translate these characters correctly into UTF-8 or something friendly like that.

Live users will definitely welcome the link schema and permalinks on WordPress. Instead of

http://cid-d4909e7f27e254e9.profile.live.com/

a user will get

http://barce.wordpress.com/ .

Also WordPress users can now link their accounts to MSN Messenger so that they can update their MSN friends or co-workers.

Are you a Windows Live Blogging user? How’d your upgrade process go?

Categories
command-line How-To wordpress

What You Missed At WordCamp LA

Here’s what you missed:

Installing nginx with php-fpm with varnish on the front end will make your WordPress install fly 50 times faster.

If you’re using apt-get, you can just use:
apt-get install php-fpm
Or try this guide on how-to forge.
Here’s the install process I used using PHP 5.3.3 on OS X:

sudo ./configure --prefix=/usr/local --enable-fpm \ 
  --with-fpm-user=daemon --with-fpm-group=daemon \ 
  --with-mcrypt --with-mysql=/usr/local/mysql --with-zlib \
  --enable-mbstring --disable-pdo --with-curl --disable-debug \
  --disable-rpath --enable-inline-optimization --with-bz2 
  --with-zlib --enable-sockets --enable-sysvsem \
  --enable-sysvshm --enable-pcntl --enable-mbregex \
  --with-mhash --enable-zip --with-pcre-regex \ 
  --with-iconv=shared,/usr
make && make install
cp sapi/fpm/php-fpm.conf /usr/local/etc/php-fpm.conf
# edit php-fpm.conf with the right paths
cp sapi/fpm/php-fpm /usr/local/sbin/php-fpm
cp init.d.php-fpm /etc/init.d/php-fpm
/etc/init.d/php-fpm start

If you get an error message it’s probably because you didn’t go through the config to set things up.

The next part is nginx.

./configure --prefix=/usr/local/nginx && make && make install

My conf/nginx.con looks like this. My sites-enabled/default.conf looks like this. My conf/fastcgi_params file is here.

I just start nginx with /usr/local/nginx/sbin/nginx and I’m good to go.

The quote that stuck with me the most was what Josh Highland said about caching:

“You should use WordPress Cache Plugins. It’s like printing money. It’s free!”

For adding your own contact form, I learned about Contact Form 7. You can ditch WuFoo if you have this configured on your WordPress.

There’s also Pods, which is like contact-form-7 except it’s a whole framework for creating your own content types and making them show up where you want.

Categories
iphone wordpress

Testing Out The WordPress iPhone App

I’m driving from LA to San Francisco today. I’m trying out the WordPress iPhone app to see how much it differs from the Desktop experience.

Categories
iphone wordpress

WPTouch Makes WordPress iPhone Friendly

If you’re on WordPress 2.7+ and have lots of iPhone hits to your blog then get WPTouch, the plug-in that turns your website into an iPhone friendly site.

Trust me. It’s awesome!

WPTouch Plug-in

Categories
WebApps wordpress

Testing the iPhone WordPress App

Just typing this from my iPhone. It works really sweet & is full of win.

Categories
wordpress

Honorius, Lifestream and kPicasa

We are all like the Roman emperor, Honorius, who watched hoards of barbarians approach the gates of Rome. He knew that whatever Rome was was coming to an end.

The same thing can be said about Web 2.0.

If I look at the permanent hires happening right now they are happening in the iPhone app world. Zynga is still hiring like gangbusters if you got the LAMP stack and/or iPhone app experience.

As of today, looking at the TechCrunch Layoffs ticker there are about 78,000 techies out of work.

What’s a techie to do?

Yesterday, I looked at two WordPress plug-ins: Lifestream and kPicasa. I am currently helping out Conscious Fashionistas with their WordPress site.

Here’s the skinny.

Lifestream is perfect if you want to get any of these social networks onto your WordPress:

For me, having twitter and flickr is plenty.

If you know PHP, then you have the additional flexibility of being able to insert this piece of code to make your lifestream show up wherever you want:

lifestream();

kPicasa doesn’t have the flexibility and focuses solely on Picasa, Google’s photo service, but it’s great if you don’t want to bother with PHP and just want to get pictures from Picasa up on the web.

Anyway, as the holidays near, and you want to share pictures or microblog, these two WordPress plugins are great.