Wordpress New Single Site Install Checklist

From GLMWiki
Revision as of 09:42, 5 April 2017 by Laury (Talk | contribs)

Jump to: navigation, search

Word Press Single Site Install


Create the Domain

[]Create the domain on ispConfig

- Go to https://dev55.gaslightmedia.com:8080 (for Angelia, go to https://angelia.gaslightmedia.com:8080)
- Add new website - client is GaslightMedia
- For Angelia: go into "Ip Address - Angelia" document on Aserv > 1-Gaslight Stuff > 0-Projects
- Domain is websitename.gaslightmedia.com - no www! (for Angelia: websitename.com or .org or whatever)
- Auto-subdomain to None (for Angelia: www.)
- 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 10M;

location / {
    try_files $uri $uri/ /index.php?$args;
}

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

Fix Permissions

[]Fix permissions on web directory

sudo chmod g+rws web

Install WordPress

! When setting up an Angelia site in conjunction with a dev55 site, you should stop here, 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 for these sites if you just need to create a server.

[]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 30-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 '{}' \;

Running the Wp-Setup script

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 other defines near the bottom

 define('DISALLOW_FILE_EDIT', true); 


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 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'!).

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"
[] Create the client's user, inquire desired credentials if not supplied

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:
[] TinyMCE
[] Nextgen Gallery
- [] Nextgen custom fields (exact name)
[] Metaslider
[] User role editor
[] Wordpress importer
[] Wordpress options importer
[] Navxt
[] Advanced excerpt
[] Gravity Forms (get from Aserv2 > 1-Gaslight Stuff > 0-Projects > Plugin Downloads)
[] CMS tree page view
[] Yoast SEO
[] Restricted Site Access
[] MainWP Child
[] 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"


MainWP setup

[] Setup site in admin.gaslightmedia.com MainWP.

Themes

Delete all themes except for the latest one. And 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

Other User Access

[] edit collins capabilities and give him access to the prototype plugin and next gen gallery plugins.

Print Friendly & PDF Settings

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

Nexgen Images

Import 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

NavXT

Breadcrumb Searator (empty)

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

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

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.
- Go into the settings: Titles and Metas, and click "Hide" at every checkbox under [Post Types] and [Taxonomies] (if not already performed)

Gravity Forms

Do an export/import to the new site.

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.

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'!).

Edit WP config

Edit wp-config.php add the following

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

Production Server Setup

[] Angelia setup [] Setup the ip address based on the next IP from the IP Address Angelia.ods on WebClients [] Update the IP Address file

After the site is created for angelia 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.

update glmdb

Update the client record in glmdb by adding the dev55 and angelia vservers to the client

Add two servers

one for dev55 and one for angelia

Put in the client creds for the server (create client editor account in wordpress)