Category Archives: Wordpress

Re-setting the mysql root password

DB corruption, or hacking? Either way, I’ve had my WordPress DB wedged twice in the last 3 years.The solution is to reset the root password. Instructions are here, but repeated below:

/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD("mynewpassword") where User='root';
flush privileges;
quit
/etc/init.d/mysql stop
/etc/init.d/mysql start

 

Signup Page – a WordPress plugin

One of my part-time duties at the day job is maintaining a WordPress site. Until recently, this involved minor edits to the templates. But things heated up few months back. I’ve been digging into the internals, learning to write plugins, and generally trying to grok the system.

Here is a plugin I wrote for one of the volunteer sites I run. I don’t claim that it is anything special, except that when I searched for something like this, I couldn’t find one. So maybe I am the first!

What does it do? It creates a signup page! For example:

From the readme.txt:

  1. Download the plugin.
  2. Unpack the zip archive to your `/wp-content/plugins/` folder
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Create a new page for the signup form. Give it a title for what you are signing up for (ie, “Pot Luck”).
  5. Add this shortcode to the signup page: `[signup_page list_title=”List” field_title=”Signup”]` (*item_title* and *field_title* are optional. The default values are “List” and “Signup”.)
  6. Create one or more child pages of the signup page. (ie, create pages called “Salad”, “Chips”, “Hot Dogs”, and “Apple Pie”. Make them children of “Pot Luck”.)

On the signup page, each of the child pages will be listed, alongside a field to *sign up* for that page.

Click here to download the zip archive.