Posts filed under Wordpress

Two Blogs, One Domain

16

Several of you have asked this question, so let’s chat about it. I run two blogs off of the Elizabeth Anne Designs domain, Weddings and Living. There are many different ways to run two blogs on the same domain, and I’ll start with the way I chose…

My choice: Install WordPress twice

(Sounds like it would be way harder than that, doesn’t it?)

The upside: Can have different categories, users, plugins, you-name-it-it-can-be-differents on the two blogs.

The downside: You’ve got two blogs now.  Two sets of plugins to upgrade, two things to keep in sync if you make changes.

Alternative: Use WordPress functionality to mimic having two blogs

Julie and Sally want to house their blogs on the same domain within the same WordPress installation.  Because WordPress creates both author pages and RSS feeds for each author by default, this one is relatively easy.

Our example domain will be www.mycookingsite.com

  • Install WordPress once
  • Create a page that will be your front page and link to both of your blogs.  The link to Julie’s blog will be: www.mycookingsite.com/author/julie and Sally’s will be: www.mycookingsite.com/author/sally
  • Create a page that will be for all posts (you don’t have to display the page anywhere)
  • Under Settings → Reading, set your blog front page to the page that you created and the posts page to the page for all posts
  • Create two users, one for Julie and one for Sally

Two things of note:

  1. If you don’t like the /author/ in the URL, here is a thread on WordPress that suggests some plugins to use that will change it.  Note: I have not used these plugins.
  2. The RSS feed for the separate blogs is www.mycookingsite.com/author/username/feed

You could also follow the instructions above except instead of using authors, you could use a category for each of your blogs.  Each category has a feed, as authors do.

Julie wants to start two blogs, one for recipes and one for food photography.

  • Install WordPress once
  • Under Settings → Permalinks, change the category base to your desired wording.  So perhaps Julie would choose “food”.
  • Create a page that will be your front page and link to both of your blogs.  The link to the blogs would be: www.mycookingsite.com/food/recipes and www.mycookingsite.com/food/photography
  • Create a page that will be for all posts (you don’t have to display the page anywhere)
  • Under Settings → Reading, set your blog front page to the page that you created and the posts page to the page for all posts
  • Create two categories, one for recipes and one for photography.
  • When you create posts, assign them to one of the two categories.

The last alternative is something we haven’t even come close to talking about yet, but if you are not a newbie to WordPress you will know about the Custom Taxonomy feature.  Justin Tadlock explains it really well in this post.

In all of the options that use existing WordPress functionality, category and tag archives will combine the posts from both blogs.

What\'s the bottom line?

If everything after the first paragraph was Greek to you, then choose option 1. :)

Do any WordPress experts have an option that I didn’t consider?

WordPress Plugins: WP Database Backup

3

Now that we have installed WordPress, we’re going to cover a few of the plugins that I consider absolute necessities for your blog.

Nothing is more integral to your blog than protecting your content.  As we talked about in the What Is WordPress Anyway? post, WordPress requires both a web server and a database to run.  The web server holds your uploaded images and files, and the database holds your posts, comments, links, etc.

Backing up your web server is essentially like backing up files on your own computer.  Use the FTP program you downloaded to copy your files to your computer or hard drive.

Backing up your database can be done multiple ways, but by far the easiest way is using the plugin WP-DB Backup.  With just a few clicks of set-up, this plugin will email you daily with a complete backup of your database.

After installing the plugin, navigation to Tools → Backup in your WordPress dashboard, and scroll down to the Scheduled Backup section.  Choose “Once Daily” and select all of the database tables on the list (if there are any to check).  Input your email address, click “Schedule backup”, and you’re all set!

Installation & Basic Configuration of WordPress

1

This post is part 5 in the series \

For the vast majority of you, installing WordPress will be an incredibly simple exercise.  Most hosting companies offer a one-click install package, such as Fantastico.  So mosey on along to your hosting provider’s interface and tell it to install WordPress already!  If your hosting provider does not have a one-click install, you will need to download the latest WordPress package and follow these instructions for installation.

As you might remember from this post, WordPress needs a MySQL database to run.  You will need to define a database name for your MySQL database, a URL to install WordPress to, and a MySQL username and password that WordPress will use to connect.

So, for example, if you are want people to visit your blog at www.mycookingsite.com/blog you might choose:

Database name = mycookingblog
URL to install WordPress = www.mycookingsite.com/blog
Username = johndoe
Password = 123abc456def7890

Take careful note of your username and password.  I recommend choosing a 16-character randomly generated password (something more secure than the one above, obviously!).  This username and password are stored in a WordPress file called wp-config.php that will be automatically created for you by your installer.  Any time you change your password (which you should do relatively often, for security purposes), you will want to update wp-config.php.  We’ll talk more about that later!

If you are using a one-click installer, you will receive an email from your hosting provider once WordPress is successfully installed on your server.  That email will contain the password that has randomly been generated for you for your WordPress “admin” user.  Go ahead and go to WordPress and log in.

The login location for My Cooking Site would be: www.mycookingsite.com/blog/wp-admin

Username = admin
Password = given in your installation email

Welcome to WordPress!

There are a few things that you will want to do immediately.

  1. Users → Add User.  Create a new user for yourself.  Make sure that author name is the one that you want to be visible inside WordPress.  Give that new user the role of Administrator.  Make sure that you choose a password that is secure and different from your database password.  Again, I recommend a 16-character randomly generated password.
  2. Log out of admin and in with your new username.
  3. Users → Add User.  Delete the admin user.  Hackers target blogs that are easy to get into, and the first username that they will try is ‘admin’.  Make yourself less susceptible by deleting the user.
  4. Settings → General.  Update all of the fields.  Be sure that the “Anyone can register” box is unchecked.
  5. Settings → Privacy.  Select the box that says: “I would like to block search engines, but allow normal visitors”.  We’ll uncheck this box once your blog is styled and ready for the world to see!
  6. Settings → Permalinks.  Choose either “Day and Name” or “Month and Name”.  Leaving the default is very bad for SEO (search engine optimization purposes).  A post URL of www.mycookingsite.com/blog/?p=123 means nothing to Google; a post URL of www.mycookingsite.com/blog/2010/01/brownie-recipe is much more descriptive!
  7. Navigate to Comments and delete the initial comment that WordPress creates by hovering over the name of the comment until links appear below it.  Select “Delete” and press “OK”.

Voila – you have WordPress!  The next post in this series will be all about plugins!  (As you know, plugins are my favorite things.)

WordPress Plugins: No Self Pings

10

I love WordPress plugins.  I’m a tech geek, so finding a new plugin that makes my life easier makes me happy.  Seriously, I think they are little bits of heaven (is that sad?). I love them so much that I’m going to regularly feature cool WordPress plugins here on Edit and Post.

What\'s a Plugin?

For those of you who are just getting to know WordPress, a plugin is a piece of code that you install and activate.  Plugins can be complex or simple, and they either add functionality to WordPress or change existing WordPress behavior.  We’ll cover the process of installing and activating plugins in the Building Your WordPress Blog series.

Some plugins have settings that you change based upon how you want them to perform.  Some have CSS files (remember CSS?) that style their results.  Others require you to edit something in your theme.

Today’s plugin is easy, all you have to do is install and activate, and it works its magic.

What\'s a Ping?

Each time you update content on your site, you are creating a ping.  A ping tells the whole web world that there is a new post in the blogosphere.  If your blog post links to another blog post, you send a pingback to the blog you linked to (make sense?).

If someone sends you a pingback and you have enabled link notifications from other blogs in your WordPress discussion settings, a pingback will then appear as a comment on the post they linked to.

This is all well and good, until you link to you.  It looks kind of silly for your own blog to comment on your own blog, now doesn’t it?

No Self Pings fixes all of that, by stopping yourself from pinging yourself.

Do you have a simple but great WordPress plugin that we should all know about?

What Is WordPress Anyway?

8

This post is part 1 in the series \

Although there are several blogging platforms available to you, we’re mainly going to discuss the technology and coding behind one of them here on Edit and Post, and that is WordPress. WordPress is currently the most flexible and powerful option out there and it’s the platform I use for Edit and Post and Elizabeth Anne Designs.

WordPress is an open-source program.  Open-source means that the code for the software is freely provided and can be altered and built upon by anyone.  Why is this cool? Because that means there are thousands upon thousands of people working every day to enhance WordPress’s functionality by creating themes and plugins to be used with the basic code (we’ll chat more about themes and plugins soon!).

WordPress requires a MySQL database to run, along with a web server.  Your WordPress database is made up of several tables.  Each table holds a specific element of data, such as your posts, blogroll links, comments, and settings.  Your web server holds your image files, theme files, plugins, and WordPress admin files.  You can think about things this way: if you upload it, it goes on your web server.  If you write it or input it, it goes into your database.

How do the web server and database talk?

They use a language called PHP.  Every time WordPress needs to “get” something from the database, a PHP script is run.  There are several default PHP functions in WordPress, and you can also create your own.

PHP = “get”
Want to get the post title? <?php the_title(); ?>
Want to get the content? <?php the_content(); ?>
Want to get the author? <?php the_author(); ?>

Depending on the data you are gathering, the WordPress PHP function may default to “get and display” or simply “get”.  Both are useful!  We’ll talk about PHP a lot more in the future, but for now, just remember that PHP is how WordPress gets data from the database.

How does the PHP function turn into results?

After the web server has received data from the database, it turns it into HTML.  HTML is the language that your browser uses to display a website.  An example:

In WordPress, I have a PHP function that says: <?php the_title(); ?>

Once my web server has processed that script for the post you’re currently reading, the database will return : What Is WordPress Anyway?

The web server then displays to you: What Is WordPress Anyway?

You never see the PHP script and neither does Firefox, Safari, IE or whatever other browser you are using!

How do I style those results?

You make HTML look pretty using a language called CSS, which stands for cascading style sheets. 

CSS tells your browser how to format things (fonts, colors, margins, spacing, etc).  CSS is very flexible, and you can style different elements of your page with different CSS markup.

Where do I put my PHP and CSS code?

Your PHP and CSS code goes inside your WordPress theme.  Simply put, your theme is how you want your WordPress data displayed to the world.  Several themes are installed with WordPress, and customizing your own theme is something that we’ll talk about in detail.

In this series of posts, we’re going to cover server needs, hosting basics, and the installation and basic configuration of WordPress. And don’t forget, if there are specific things that you would like me to cover, comment or contact me to let me know!