Wordpress Install (the classic way) and Feature Tour

Homework

  1. Introduction to Wordpress
  2. Local Development Environments
  3. Wordpress SQL Queries

Morning reflection

Housekeeping

  • This afternoon: Review session and A3/A4 answer keys

1. Install WP

Learning Objectives

  1. Install a vanilla version of WP on your system.
  2. Locate the wp-config.php file in a WP installation.

Materials

Key Takeaways

  • File permissions for Mac. In order to install themes and upload Media, WP needs write access to your wp-content directory:

    1. Navigate to your WP root directory (Tony’s location):

       $ cd /Users/tony/.bitnami/stackman/machines/xampp/volumes/root/htdocs/blog
      
    2. Make your wp-content folder writable:

       $ chmod -R 777 wp-content
      

      Warning: DON’T do this on a hosted website.

  • This method of installation is a last resort but is sometimes needed. We’ll use more modern methods next week but keep this installation as a code reference.
  • Pro-tip: On the “Information needed” page that asks for an account username, DON’T use admin on production websites (it’s fine for today). That’s honey for hack bots.

2. WP Tour

Learning Objectives

  1. Summarize the major features of the Wordpress Admin panel.
  2. Locate the wp-content directory in a WP installation.
  3. Understand the purpose of wp-content and the directories inside it.
  4. Locate the database fields referenced in 13 Useful WordPress SQL Queries You Wish You Knew Earlier.

Materials

Key Takeaways

  1. The wp-content is the only directory you usually need to deal with for most projects. It’s safe to ignore wp-admin and wp-includes.

     project-root
       ├─ wp-admin
       ├─ wp-content    
         ├─ plugins
         ├─ themes
             ├─ theme-1
             ├─ theme-2
             └─ theme-3
         └─ uploads
       └─ wp-includes
    
    • plugins contains all the (you guessed it) plugins you install from the Admin panel. Elementor (covered next week) is a theme-builder that will be installed as a plugin.
    • themes is the closest thing WP has to a views folder. This is where any installed themes are located.
    • uploads contains all the Media files you upload in the Admin panel.
  2. Plugins
    • The number one source of blog bloat:
      • Beware of client projects that have more than 20 plugins;
      • Beware of plugins that are more than a major version out of date;
      • Beware of plugins that are no longer maintained.
  3. Posts - great for content that:
    • has an author(s);
    • has a category;
    • can be tagged;
    • has a date:
      • is organized by date;
      • needs to be scheduled.
    • each post type can be assigned a page template
    • don’t support custom templates
    • can be customized by setting a Post Format (the theme must explicitly support this)
  4. Pages - great for content that:

Review and Assignment 3 & 4 Answer Keys

  • Tony needs an example project from Assignment 3. Post your Heroku link and GH repo in the chat if you’d like Tony to make an example of you.

Dailies

  • No Daily for today.