Wordpress New Single Site Install Checklist

From GLMWiki
Revision as of 16:09, 19 September 2017 by Laury (Talk | contribs)

Jump to: navigation, search


Development Server Setup

[] Create the domain on ispConfig

- Go to https://dev55.gaslightmedia.com:8080
- Add new website - client is GaslightMedia
- Domain is websitename.gaslightmedia.com - no www!
- Auto-subdomain to None
- Check "SSL" (do not check "SSI")
- SAVE
- In the Websites menu, find the website by the Domain. Get back into the website editing screen. Go to the Options tab, and add the following to nginx directives

client_max_body_size 48M;

location / {
    try_files $uri $uri/ /index.php?$args;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires max;
}

# Add trailing slash to */wp-admin requests.
rewrite /admin$ $scheme://$host$uri/ permanent;

- Save again, and go back again, to the SSL tab
- Fill in State (Michigan), Locality (Petoskey), Organisation (Gaslight Media), Org Unit (1), and Country (United States). Skip the rest of the fields except the last one, and set that to "Create Certificate"
- Save again, and the SSL will begin to be processed

Production Server Setup

- Go to https://eleusis.gaslightmedia.com:8080
- Add new website - client is GaslightMedia
- Go into the Eleusis IP address document on Aserv > 1-Gaslight Stuff > 0-Projects. Use the next available IP and update said file with this site
- Domain is websitename.com or .org or whatever, but no www. prefix!
- Auto-subdomain to www.
- SAVE
- Enter the same Nginx directives as for dev55. 
- Do not set up SSL at this point

After the site is created for Eleusis test that the php is working correctly by creating a php.php file with:

<?php phpinfo();?>

This will make sure that the php-fpm service is connecting with nginx. If it is not functioning correctly you'll probably get a bad gateway error message.

Fix Permissions

[] Fix permissions on web directory of each server you've set up

sudo chmod g+rws web

! When setting up an Eleusis site in conjunction with a dev55 site, you should stop here with any work performed on the production site, because the dev55 copy will be transferred over when the time comes to bring the site live. You don't need to waste any time setting up WordPress installations for these production sites if you just needed to create a server.

Install WordPress

[]Install wordpress using ispconfig

APS Installer > Available Packages > Search for "Wordpress"
Click newest version > "Install this package"
Install Location: <site to install>
Admin login: glmdev
password: <our default> -- you will get no confirmation!!!
Administrator's email: dev@gaslightmedia.com
Site Name: <site to install>

Refresh Installed Packages after ~60s, should say "Installation_success"

Fix file permissions on web directory

In site top directory: 
sudo chmod -R g+rw web
Then in /web directory:
find . -type d -perm /g=x ! -perm /g=s -exec sudo chmod g+s '{}' \;

Editing WP-Config.php

Edit wp-config.php (located in web/). Grab the DB_NAME, DB_USER and DB_PASSWORD values while you're in there.

$table_prefix = 'glm_';

This changes default table_prefix to glm_ and allows all new pages to start using that prefix. Now you have to change the ones already set up with wp_

Add this to wp-config.php as well, with the defines Above the part that says " /* That's all, stop editing! Happy blogging. */

 if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
    $_SERVER['HTTPS'] = 'on';
}
define('DISALLOW_FILE_EDIT',true);

Running the Wp-Setup script

Using WP-Setup to update the options,table names and setup our Gaslight User Accounts. If you don't have it yet: clone git@cvs2:prog/Grunt/WP-Setup. This should already exist on your home folder on dev55. CD into the wp-setup folder. Edit the (Gruntfile.coffee) following lines to setup the database credentials.

There are two areas:
mysqlrunfile: connection options
backup4mysql: options

change EVERY instance of the user, password and database

Then run

grunt wpSetup

At this point, sign into the site and make sure it's working, and all the webteam users are added.

GLMDB

Set up a Wordpress user for the client. Think of a sensible, secure password. Go into GLMDB for this client and add the necessary credentials as a Server (not under 'Credentials'!) for both Dev55 and Eleusis.

Initial WordPress Setup

Head into wordpress using sitename.gaslightmedia.com/wp-admin

[] update WordPress if needed
[] update any WordPress themes if needed
[] remove the WP Multibyte Patch
[] Create a new page called "News" or "Blog"
[] Settings > General > tagline to something better ("Website for ...")
[] export pages if needed and change any dev.gaslightmedia.com references to site url.
[] set Settings > Reading > front page to static: Front page
[] set Settings > Reading > blog page static to "News" or "Blog"
[] set Settings > Permalinks > Common Settings to "Post name"
[] import pages if needed
[] import options if needed
[] under Settings > Discussion 
    [] uncheck All of the settings at "Default article settings"
    [] uncheck both settings at "E-mail me whenever"
    [] Check "Comment author must fill out name and email
    [] Check "Comment must be manually approved"

If for some reason you did not run the WP-Setup script, the following items will also have to be done. Otherwise, proceed to the next section.
[]*setup users  (edit every user)
  []*set nickname for each user
  []*uncheck Show Toolbar when viewing site
[]*set Settings > General > timezone to detroit 
[]*set Settings > General > start of week to Sunday
[]*make sure there are no pages except one called "Front page", and only one "Hello world" post

Common Plugins

Common Plugins


- WP Plugins installed through the Wordpress installer:
[] Advanced excerpt (by Delicious Brains)
[] Breadcrumb Navxt (by John Havlik)
[] Captcha (by BestWebSoft)
[] CMS tree page view (Pär Thernström)
[] Login LockDown (by Michael VanDeMar)
[] MainWP Child (by MainWP)
[] Media Category Management (by DeBAAT)
[] Metaslider (by Team Updraft)
[] Nextgen Gallery (by Imagely)
- [] Nextgen custom fields (by Shaun Alberts) ((this exact plugin name! There are ones very similar))
[] Restricted Site Access (by Jake Goldman, 10up, Oomph)
[] TinyMCE Advanced (by Andrew Ozz)
[] User role editor (by Vladimir Garagulya)
[] Wordpress importer (by wordpressdotorg)
[] WP Options Importer (by Matthew Boynes)
[] Yoast SEO (by Team Yoast)
[] WP Security Audit Log (by WP White Security)

- Plugins installed Manually
[] Gravity Forms (get from Aserv2 > 1-Gaslight Stuff > 0-Projects > Plugin Downloads)
   - This plugin may need to be updated, in which case a new version may have to be downloaded. Have a look at WebClients > 1-Gaslight Stuff > 0-Projects > 1-Plugin Licenses and Websites.ods to see where this can be done

[] Activate these up-to-date plugins. Remember to hold off in the first round on activating plugins that require others to be active (like NGG Custom Fields).

Delete these plugins

[ ] Hello Dolly
[ ] WP Multibyte Patch

- Optional plugin if you want to make every part of your WP admin work more tolerable
[] Jarvis

Themes

Delete all default themes except for the latest "twenty{something}" one.

Also make sure all plugins and themes are updated.

Install GLM Plugins

GLM Plugins Installed:
git clone git@cvs2:WP-Plugins/Gaslightify.git
git clone git@cvs2:WP-Plugins/glm-client-info.git
git clone git@cvs2:WP-Plugins/glm-blocks.git
git clone git@cvs2:WP-Plugins/glm-support-form.git
git clone git@cvs2:WP-Plugins/GlmPrototypes.git

Plugin Configuration

Breadcrumbs NavXT

Breadcrumb Searator (empty)

Settings > Breadcrumb Navxt > General > Breadcrumb Separator
Settings > Breadcrumb Navxt > General > Home Breadcrumb > Home Template > Replace '%htitle%' with the word Home
Settings > Breadcrumb Navxt > General > Home Breadcrumb > Home Template (Unlinked) > Replace '%htitle%' with the word Home

Gravity Forms

[ ] Setup the key 88d5659ef4ebfeae7c234b3b11cb35e0
[ ] Turn on Toolbox Menu (may need to update plugin to see this in settings)

MainWP

 
Get into Settings > MainWP Child.
Check "Require unique security ID". Hit Save Changes.
Copy the id.
Head to admin.gaslightmedia.com/wp-admin. Sites > Add New
Enter all the information. No need to change Certificate and SSL version or anything, but enter the HTTP username and password based on our default glmdev account.

Login Lockdown

  "Settings" -> "Login LockDown"
  Max Login Retries = 5
  Lockout Invalid Usernames" = Set to Yes
  Show Credit Link = "No, do not display the credit link"
  Click "Update Settings"

Nexgen Images

Importing Nextgen images:

!!! First go to Media > Settings and make sure the dimensions are the SAME as on Dev, or you'll be missing 
image resizings and will have to copy them over

Get the export from the database at dev.gaslightmedia.com site on ISPConfig for ngg_albums, ngg_galleries, 
and ngg_pictures
Edit those files to replace wp_8 with glm, and take out the /sites/8 part (the 8 here will be dependent on 
the ID for that site in dev.gaslightmedia.com multisite)
Import those into the database of the new site AFTER installing the nextgen plugin,
 in this order: albums, galleries, pictures.

Make sure all the gallery templates are set properly again, they'll still point to their old location 
(This might be more easily doable through the database?) - also set default templates for thumbnails (and 
any other used) in Gallery Settings to glmPhotos, ajax pagination to Yes, show slideshow link to No, Compact 
Album template to GlmAlbums, override thumbnail dimensions for both to 220x190

Other Options > Thumbnail Opts > Default Thumbnail Dims > 220x190

Print Friendly & PDF Settings

[] Goto the setting > Print Friendly & PDF and uncheck for pages.

User Role Editor

Set user role permissions for Editor for:
- Nextgen managing albums and galleries and uploading images (all but " NextGEN Change Options")
- UNSET Yoast SEO bulk edit permission

gravity forms:
- gravityforms_delete_entries
- gravityforms_edit_entries
- gravityforms_edit_entry_notes
- gravityforms_export_entries
- gravityforms_view_entries
- gravityforms_view_entry_notes

advanced ads:
- all of the associated capabilities

[] edit Collins' capabilities: enable glm_proto_edit (Prototype plugin) and all Nextgen capabilities for him

WooCommerce

Go to WooCommerce > Settings > Emails(tab) > Recipient(s) and change the recipient to the client's desired address.

Change the wordpress settings so that it's www.website.com and not website.com

Once finished, archive the site on dev.gaslightmedia.com so only super admins can see it.

Yoast SEO

- Get User Role Editor so that "seo bulk edit" can be disabled for Editors (if not performed above)
- In the Features tab the Advanced settings pages needs to be enabled.
- In the Titles & Metas menu item, click "Hide" for every Yoast SEO Meta Box selector in the  [Post Types] and [Taxonomies] tabs

GLMDB

Again, if you have not already by this point, go into GLMDB for this client and add the login info as a Server (not 'Credentials'!) for both Dev55 and Eleusis.

The credentials to use should be those set up for the Wordpress user set up for the client, likely with Editor role.

Finished