Sagamore PTA Wordpress notes: Difference between revisions

From Parents
Jump to navigation Jump to search
(→‎Setup: sagamorehillspta as existing user)
(Update)
Line 1: Line 1:
Wordpress notes from the {{discussion list|name=Sagamore Online gang|id=sagamore.online|page=Sagamore online}}, used for the [[Sagamore Hills PTA website]].
[https://wordpress.org/ Wordpress] specific notes for the [[Sagamore Hills PTA website]]


==Styling==
==Styling==


Bother [[John Lenz]] to make it 'perty.
Bother [[John Lenz]] to make it 'perty.

==Migration==

Importing content from another Wordpress installation can be done with the '''Tools → Export/Import''' options. Some notes:

* Media files (attachements) will only import from an '''"All content" export'''
** Since "All content" includes elements you might not want to import, like comments or navigation menus, try '''pruning the XML export file''' of those elements before importing
* Posts will maintain their Wordpress '''post IDs''' if possible!

==Addresses (URLs)==

===Address beautification===

Be sure to:
# Admin → Settings → Permalinks → Day and name
# ''Then:'' Custom Structure
# Remove the trailing slash

(to get rid of the ugly "?p=#" and default trailing slash)

===Change starting post ID===

''From [[Sagamore online goals 2014#URL_redirects]]:''

Make the new Wordpress installation use post IDs we haven't used before to avoid collisions (terms and users weren't utilized enough on the old site to bother with), then setup .htaccess redirects from the old to the new as desired.

# On the new Wordpress database:
#: <pre>ALTER wp_posts AUTO_INCREMENT = 2001 ;</pre>


==Plugins==
==Plugins==
Line 41: Line 13:
===Redirects===
===Redirects===


* [https://wordpress.org/plugins/redirection/ WordPress › Redirection « WordPress Plugins] (chosen over [https://wordpress.org/plugins/quick-pagepost-redirect-plugin/ Quick Page/Post Redirect Plugin])
* [https://wordpress.org/plugins/redirection/ WordPress › Redirection « WordPress Plugins] (chosen over [https://wordpress.org/plugins/quick-pagepost-redirect-plugin/ Quick Page/Post Redirect Plugin] (2014-09))


===Calendar===
===Calendar===


You can just [https://support.google.com/calendar/answer/41207 embed Google Calendars], but they're ugly. Instead, use a plugin to pull and present calendar data.
* [https://wordpress.org/plugins/google-calendar-events/ WordPress › Google Calendar Events « WordPress Plugins]

Tried [https://wordpress.org/plugins/google-calendar-events/ Google Calendar Events] 2014-09, but it was buggy ([[Dave Barker|Dave]])


===Facebook===
===Facebook===
Line 54: Line 28:


How a new installation was setup for the PTA website reset 2014-09
How a new installation was setup for the PTA website reset 2014-09

===Fresh install===


# Login to the [[Sagamore Hills PTA Dreamhost account]] and install Wordpress
# Login to the [[Sagamore Hills PTA Dreamhost account]] and install Wordpress
Line 90: Line 66:
#::: ''("Day and name" minus the trailing slash)''
#::: ''("Day and name" minus the trailing slash)''
# Delete default example content: comment (comment 1 from Mr. Wordpress on post Hello World), post Hellow World (id=1), page Sample Page (id=2))
# Delete default example content: comment (comment 1 from Mr. Wordpress on post Hello World), post Hellow World (id=1), page Sample Page (id=2))

# Import
===Import old content===
## Old site, Tools → Export → All content (save somewhere)

## New site, Tools → Import → Wordpress
Notes:
### Install plugin as prompted

### "Activate plugin"
* Posts (pages) will maintain their Wordpress '''post IDs''' if possible (they aren't already taken on the new site), so fewer broken links!
## Tools → Import → Wordpress (select saved export)
* Media files (attachments) will only import from an '''"All content" export'''
### Assign posts to an existing user (sagamorehillspta)
* Since "All content" includes elements you might not want to import, like comments or navigation menus, try '''pruning the XML export file''' of those elements before importing
### Download and import file attachments

# Plugins
# Old site, Tools → Export → All content (save somewhere)
## Delete unused default plugins Akismet and Hello Dolly
# New site, Tools → Import → Wordpress
## Install
## Install plugin as prompted
##* [https://wordpress.org/plugins/email-post-changes/ Email Post Changes]
## "Activate plugin"
##* [https://wordpress.org/plugins/redirection/ Redirection]
# Tools → Import → Wordpress (select saved export)
##* [https://wordpress.org/plugins/redirection/ Google Calendar Events]
## Assign posts to an existing user (sagamorehillspta)
## Download and import file attachments

===Plugins===

# Delete unused default plugins:
#* Akismet
#* Hello Dolly
# Install
#* [https://wordpress.org/plugins/email-post-changes/ Email Post Changes]
#* [https://wordpress.org/plugins/redirection/ Redirection]


==Old ideas==
==Old ideas==

'''''Don't'' do these!'''

===Change starting post ID===

'''''Not needed''' if content is [[#Import_old_content|imported]]''

''From [[Sagamore online goals 2014#URL_redirects]]:''

Make the new Wordpress installation use post IDs we haven't used before to avoid collisions (terms and users weren't utilized enough on the old site to bother with), then setup .htaccess redirects from the old to the new as desired.

# On the new Wordpress database:
#: <pre>ALTER wp_posts AUTO_INCREMENT = 2001 ;</pre>


===Assigning post IDs===
===Assigning post IDs===


'''''Don't use:''' Although the following is possible, it's probably better to just [[#Migration|import old content]] and/or use redirects for old content (ala [[Sagamore .htaccess]]) and make new content use unique post IDs by doing [[#Change starting post ID]].''
'''''Don't use:''' Although the following is possible, it's probably better to just [[#Import_old_content|import old content]] and/or use redirects for old content (ala [[Sagamore .htaccess]]) and make new content use unique post IDs by doing [[#Change starting post ID]].''


* [https://wordpress.stackexchange.com/questions/7177/how-can-i-assign-post-a-specific-id-on-creation#answer-7230 migration - How can I assign post a specific ID on creation? - WordPress Development Stack Exchange]
* [https://wordpress.stackexchange.com/questions/7177/how-can-i-assign-post-a-specific-id-on-creation#answer-7230 migration - How can I assign post a specific ID on creation? - WordPress Development Stack Exchange]
Line 117: Line 117:
* Might want to know how to [http://vocecommunications.com/blog/2011/03/running-wordpress-from-command-line/ execute from the command line] too
* Might want to know how to [http://vocecommunications.com/blog/2011/03/running-wordpress-from-command-line/ execute from the command line] too


When importing content, it may be easier for sake of redirecting to assign posts/pages the same ID they had on the export site (especially if the export site exposed IDs in its URL (like the PTA site from 2012-2014)). ''This happens automatically with Wordpress's Tools → Import if the IDs aren't already taken.''
When importing content, it may be easier for sake of redirecting to assign posts/pages the same ID they had on the export site (especially if the export site exposed IDs in its URL (like the PTA site from 2012-2014)). : ''This happens automatically with Wordpress's Tools → Import if the IDs aren't already taken!''


===Page Tagging & Categories===
===Page Tagging & Categories===
Line 130: Line 130:
* [https://wordpress.org/plugins/tag-pages/ Tag Pages]
* [https://wordpress.org/plugins/tag-pages/ Tag Pages]
* [https://wordpress.org/plugins/page-tagger/ Page Tagger]
* [https://wordpress.org/plugins/page-tagger/ Page Tagger]

==Further Reading==

* https://managewp.com/wordpress-content-management-complete-guide





Revision as of 15:26, 12 September 2014

Wordpress specific notes for the Sagamore Hills PTA website

Styling

Bother John Lenz to make it 'perty.

Plugins

Site change notifications

So folks know when the website has been changed, the Wordpress plugin: Email Post Changes comes in handy.

Redirects

Calendar

You can just embed Google Calendars, but they're ugly. Instead, use a plugin to pull and present calendar data.

Tried Google Calendar Events 2014-09, but it was buggy (Dave)

Facebook

See: Sagamore Facebook

Setup

How a new installation was setup for the PTA website reset 2014-09

Fresh install

  1. Login to the Sagamore Hills PTA Dreamhost account and install Wordpress
    1. Manage Domains → Add Hosting to a Domain/Sub-Domain
      Do you want the www in your URL?
      Remove WWW: Make http://www.example.com/ redirect to http://example.com/
      Run this domain under the user
      sagamorehillspta
    2. One-Click Installs → Wordpress (without Deluxe Install)
  2. Wordpress installation setup (at web address)
    Username
    sagamorehillspta
    Email
    communications@sagamorehillspta.org
  3. Settings
    General
    Tagline
    blank
    Timezone
    America / New York
    Discussion
    Default article settings
    Deselect all 3 (notify, trackbacks, comments)
    Media
    Uploading Files
    Deselect, "Organize my uploads into month- and year-based folders"
    Permalinks
    Common Settings
    Custom Structure
    /%year%/%monthnum%/%day%/%postname%
    ("Day and name" minus the trailing slash)
  4. Delete default example content: comment (comment 1 from Mr. Wordpress on post Hello World), post Hellow World (id=1), page Sample Page (id=2))

Import old content

Notes:

  • Posts (pages) will maintain their Wordpress post IDs if possible (they aren't already taken on the new site), so fewer broken links!
  • Media files (attachments) will only import from an "All content" export
  • Since "All content" includes elements you might not want to import, like comments or navigation menus, try pruning the XML export file of those elements before importing
  1. Old site, Tools → Export → All content (save somewhere)
  2. New site, Tools → Import → Wordpress
    1. Install plugin as prompted
    2. "Activate plugin"
  3. Tools → Import → Wordpress (select saved export)
    1. Assign posts to an existing user (sagamorehillspta)
    2. Download and import file attachments

Plugins

  1. Delete unused default plugins:
    • Akismet
    • Hello Dolly
  2. Install

Old ideas

Don't do these!

Change starting post ID

Not needed if content is imported

From Sagamore online goals 2014#URL_redirects:

Make the new Wordpress installation use post IDs we haven't used before to avoid collisions (terms and users weren't utilized enough on the old site to bother with), then setup .htaccess redirects from the old to the new as desired.

  1. On the new Wordpress database:
    ALTER wp_posts AUTO_INCREMENT = 2001 ;

Assigning post IDs

Don't use: Although the following is possible, it's probably better to just import old content and/or use redirects for old content (ala Sagamore .htaccess) and make new content use unique post IDs by doing #Change starting post ID.

When importing content, it may be easier for sake of redirecting to assign posts/pages the same ID they had on the export site (especially if the export site exposed IDs in its URL (like the PTA site from 2012-2014)).  : This happens automatically with Wordpress's Tools → Import if the IDs aren't already taken!

Page Tagging & Categories

Of the two default content types in Wordpress, Pages (unlike the other, Posts), cannot have Tags or Categories associated with them by default. It is relatively simple to change that with some code or a simple plugin:

Only add Tags (not Categories) to Pages: