Mostly about my amusement

Tag: WordPress (page 13 of 13)

Upgraded to WordPress 2.1

So far so good. On the upgrade from 2.0.7 the TinyMCE visual editor does not work while on my test blog it does work. I don’t use the visual editor so no big deal for me.

After installing and trying out many plugins and themes the options table in my wordpress database is a mess. I may just export everything and re-import into a clean database just to clean out the cruft.

WordPress SSL Admin plugin (patched)

A while back WordPress.com released a plugin which protected your login with SSL. Normally when you administer a WordPress blog, it’s done via http. The plugin was originally released for the WordPress 2.1-alpha release. After a few updates it stopped working.

Over at Haris.tv this gentleman fixed the plugin and released a patch version of it which works with 2.0.6 as well as 2.1 (I have not tried 2.1 yet). It works like a charm (been playing with it all day). If you use a wordpress blog, have SSL set up on your web server, then it’s a must have and you should install it ASAP.

WordPress Backup

I run this blog on a VPS from Tektonics. It’s usually more available to the Internet than the server in the basement.

The only concern is that it’s not my server and backups are important. I had been using Tamba2’s script for backing up on a cron job but forgot that the script only got tables that you told it to. Donncha’s script gets all the tables, but I like getting one file for the data. Also I want to be able to retrieve the file backup without using a password onto the system but make sure that the file can’t be used by other people. For me that means putting it on the web server but encrypting the backup so that only my private key can decrypt the data.

The idea is to

  • Backup all the tables in the WordPress database
  • E-mail the database backup to an e-mail address of my choosing
  • Create a file backup
  • Encrypt the file backup and put it somewhere it can be downloaded
  • Retrieve the backup and store it somewhere else

The GPG file encryption is over the top; I’m practicing for solving a problem at work where scripts and passwords are a huge no-no.

Read more

Videotags this easy ought to be illegal

I frequent the WordPress support page to a) see if I can help someone and b) see if anything new is going on that might interest me.

Viper’s Video Quicktags is beyond interesting. It makes it ridiculously easy to add video to your post as so:

[ youtube width=”425″ height=”350″]wMwoexR1evo[ /youtube]

and

[ googlevideo width=”425″ height=”350″]4437565772125007816[ /googlevideo]

A space was added right after each [ so the plugin would ignore it. Without the spaces, this cheerfully produces

and

All into the posting. You can use the WYSIWYG editor that WordPress provides since Viper007Bond supplies you with easy buttons to produce a dialog box for inserting the codes.

This particular posting was made using BlogJet and not the built in editor. I used YouTube and Google Video but the plugin supports many more.

It’s well written, simple to use and works. Get it at Viper’s web page here.

Moving WordPress

This blog was running on Stefan’s DSL connection and with me tinkering with it I was using up his bandwidth. Usually when he was trying to connect to the office and get some work done.

I have a very good connection to the Internet via Optimum Online. It’s a dynamically assigned address but does not change and even if it does I run a dynamic DNS client to tell my DNS server when I’ve moved. So I decided that I would move the blog and change the whole URL. Easy right?

  1. I wanted to create the virtual host blog.dembowski.net on my basement web server dixie.dembowski.net while maintaining both virtual hosts. Oh yeah and use only one IP address.
  2. I wanted to change the host name and the web page URL from http://www.dembowski.net/wordpress/ to http://blog.dembowski.net/.

Setting up the virtual server

I added to my DNS zone dembowski.net a new record for blog.dembowski.net:

blog.dembowski.net. 3600 IN CNAME dixie.dembowski.net.

A while back I switched my server’s Linux distribution from Fedora to SuSE. One of the appeals was that SuSE comes with a reasonable configuration tool called yast.

Yast has a section for creating virtual hosts in Apache, and I thought how hard can this be?

After killing lots of time and totally breaking the web server configuration I ended up removing the Apache packages, deleting /etc/apache2 directory and /etc/sysconfig/apache2 file (options and configs remain even if you remove the software packages).

# rpm -e apache2-mod_php5 apache2-prefork apache2
# rm -rf /etc/apache2 /etc/sysconfig/apache2

I used yast to re-install the same packages, ran the online update, configured apache and got back a basic no frills web server running.

Most Linux distributions have put a conf.d directory in Apache’s configuration directory. It works like this: any file with the extension .conf gets included in the configuration. I knew about this but figured using yast would be easier.

So much for that idea. I went into yast one last time to enable the apache modules php5 and rewrite. Enabling mod_rewrite is not enough, you also need to turn on the FollowSymLinks option or it just does not work.

The configuration file I created in /etc/apache2/conf.d contains the following lines

NameVirtualHost *

<VirtualHost *>
ServerName dixie.dembowski.net
DocumentRoot /srv/www/htdocs
ServerAdmin webmaster@dembowski.net
ErrorLog /var/log/apache2/dixie.dembowski.net-error_log
CustomLog /var/log/apache2/dixie.dembowski.net-access_log combined
</VirtualHost>

<VirtualHost *>
ServerName blog.dembowski.net
DocumentRoot /srv/www/htdocs/wordpress
ServerAdmin webmaster@dembowski.net
RewriteEngine On
<Directory /srv/www/htdocs/wordpress>
Options +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/blog.dembowski.net-error_log
CustomLog /var/log/apache2/blog.dembowski.net-access_log combined
</VirtualHost>

Not too complicated really. Now when I point my web browser to either host name I get two different web pages.

Preparing WordPress

First off read this whole article, and seriously this part. The WordPress documentation is really good and helped a lot. Normally you would want to do one or the other; being a “challenging” person I was determined to do both.

I did NOT read the documentation. There is a step where you need to tell WordPress the URI for referencing itself. The documentation says Update Options -> Logout -> “Do not try to open/view your blog now!” They are not kidding around, WordPress sends you to the web page it thinks it is running on and not the host that it actually is running.

Restoring the web server files and directory onto the new box was not a problem. And the mysql backup was edited with vi and I changed all of the references from http://www.dembowski.net/wordpress/ to http://blog.dembowski.net/. I had to have missed one because every time I went to the web page http://blog.dembowski.net/ I was sent to the old server whenever I clicked on anything including the admin web pages.

There probably is a better way to do this but I eventually just put into my workstations hosts file the IP address of the new box and claimed it was www.dembowski.net. Just to play it safe I shut down the old web server, logged into the new box and fixed all of the options with the new info. Once I was all done I removed the bogus entry in my hosts file.

WordPress’s PHP scripts on my box kept running out of memory and crashed. I changed the file /etc/php5/apache2/php.ini and changed the memory_limit from 8M to 1632M That seems to have taken care of it.

All that was left to do is make sure that anyone going to the old web page gets sent to the new one. On the old server I changed the .htaccess file in the wordpress directory to now read

RewriteEngine On
RedirectMatch ^/wordpress/(.*) http://blog.dembowski.net/$1 [L,R]

Apache’s mod_rewrite rocks. This took any web requests for http://www.dembowski.net/wordpress/anything and redirected the web browser to go to the new URL with http://blog.dembowski.net/anything.

Blog successfully migrated to a new host and a new directory. Next up putting SSL back on one of my virtual web servers.

Interesting application this WordPress

After a couple of days I can see that blog’s are an interesting concept, and light weight software on the server and client. Using WordPress I can

  • Write and publish content,
  • I can play with the theme of the blog,
  • Administer the blog,
  • install new themes, plugins, etc.

All done with very little effort; this software is very easy to use. WordPress was disturbingly quick to install and very little Geek Points needed to set this up. Total time spent setting this up was all of 45 minutes, and mostly because I did not read the easy to read and search online help. But I also see that there are some (minor) drawbacks.

I have not yet seen (okay in a few days) a good interface for formating and dropping in graphics. The default tool is very good and easy to use but requires the author to insert HTML codes. What I’d like to see is some sort of editing tools along the lines of gmail’s interface. Gmail’s compose mail tool let’s you format the text, insert bullets, change font and size, etc. I’m very happy with WordPress and will keep looking for someway to do this. GMail might actually work; I can setup a mail account and post via that e-mail. I’ll set that up and see if it preserves the html formatting.