How to Install a Brand New Site

Get Ready

  1. register domain somewhere
  2. set up domain in HG account as an add-on domain (if not the main domain)
  3. set up mysql db and db user on HG. For user, don’t forget the check all privileges
  4. point registrar to HG
  5. set up and install /bin

WordPress

  1. go to wordpress.org and download current zip to local machine
  2. upload zip to HG
  3. go to the top level dir (ex: /home1/martha/www/berkeleycycleworks.com) on HG and unzip WP
  4. rename wordpress to wp
  5. COPY wp/index.php to / , edit it and add “/wp” before the blogheader thing
  6. hit the new site in a browser and answer the DB setup questions
  7. remove wp-config-sample.php
  8. set in wp-config.php
    1. /* begin Martha's favorite debug settings */
    2. define( 'WP_DEBUG', true );  // NOTE: WITHOUT THIS the less plugin will not recompile. Keep true during development.
    3. define( 'SAVEQUERIES', true );
    4. define( 'WP_DEBUG_LOG', true );
    5. error_reporting(0);
    6. @ini_set('display_errors', 0);
    7. define('WP_DEBUG_DISPLAY', false);
    8. /* end Martha debug */
    /* begin Martha's favorite debug settings */
    define( 'WP_DEBUG', true );  // NOTE: WITHOUT THIS the less plugin will not recompile. Keep true during development.
    define( 'SAVEQUERIES', true );
    define( 'WP_DEBUG_LOG', true );
    error_reporting(0);
    @ini_set('display_errors', 0);
    define('WP_DEBUG_DISPLAY', false);
    /* end Martha debug */
  9. in wp-admin / general set up the site and wp url and save
  10. in wp-admin / general clear out site subtitle and save
  11. in WP admin settings/ permalinks, change to postname based links and save
  12. in wp admin set admin email to martha@trumpetvine.com
  13. in wp admin / reading check discourage search engines
  14. at top level create robots.txt and put in:
    1. User-agent: *
    2. Disallow: /
    3. Disallow: *component*
    User-agent: *
    Disallow: /
    Disallow: *component*
  15. remove all themes except the last default (and active) theme
  16. test site

Parent Theme

  1. from the themes dir:
    1. git clone https://github.com/martham/trumpetvine-framework.git
    2. mv trumpetvine-framework ..   (?? double check this)
    3. cd trumpetvine-framework
    git clone https://github.com/martham/trumpetvine-framework.git
    mv trumpetvine-framework ..   (?? double check this)
    cd trumpetvine-framework
    1. if have UNIX access do:
    2.      rm page.php
    3.      ln -s page-with-title.php page.php
    4.      rm index.php
    5.      ln -s page-no-title.php index.php
    6. else do:
    7.      cp page-with-title.php page.php
    8.      cp page-no-title.php index.php
    if have UNIX access do:
         rm page.php
         ln -s page-with-title.php page.php
         rm index.php
         ln -s page-no-title.php index.php
    else do:
         cp page-with-title.php page.php
         cp page-no-title.php index.php
    1. activate trumpetvine-foundation and test
    activate trumpetvine-foundation and test

    cp phpinfo.php to “www” dir

Child Theme

  1. in the themes dir:
    1. git clone https://github.com/martham/trumpetvine-child.git
    2. mv trumpetvine-child CHILD_THEME_NAME_HERE
    3. cd CHILD_THEME_NAME_HERE
    4. rm page.php
    5. ln -s ../trumpetvine-framework/page.php page.php
    6. cp page.php front-page.php
    7. edit front-page.php and update Template name to Home Page
    8. cp ../trumpetvine-framework/footer.php .
    9. cp ../trumpetvine-framework/header.php .
    git clone https://github.com/martham/trumpetvine-child.git
    mv trumpetvine-child CHILD_THEME_NAME_HERE
    cd CHILD_THEME_NAME_HERE
    rm page.php
    ln -s ../trumpetvine-framework/page.php page.php
    cp page.php front-page.php
    edit front-page.php and update Template name to Home Page
    cp ../trumpetvine-framework/footer.php .
    cp ../trumpetvine-framework/header.php .
  2. if using Components CPT:
    • uncomment out that section in child functions.php
    • copy TF 404.php to child theme, uncomment the component URL, and in the DB create the /component/404-text page
    • SAVE PERMALINKS
  3. edit style.css in child theme, update description and theme name (do not change template – thats the parent name!)
  4. If customizing the login screen, uncomment out that style sheet enqueue in the enqueueing PHP file
  5. review child functions.php – any optional features to uncomment?
  6. activate child theme and test

Custom Front page (if applicable)

  1. create a WP page and set the template to Home Page
  2. in WP Settings/Reading, set home pg to newly created page

Git

  1. in child theme dir, delete .git* dirs and do a gitmakerepo
  2. rm README
  3. create private repo on github
    1. cd /wp
    2. gitmakerepo
    3. confirm the following line is in .gitignore:
    4. *trumpetvine-framework*
    5. git remote add origin https://github.com/martham/CHILD.git
    6. git add *
    7. git commit -m 'initial commit'
    8. git push -u origin master
    cd /wp
    gitmakerepo
    confirm the following line is in .gitignore:
    *trumpetvine-framework*
    git remote add origin https://github.com/martham/CHILD.git
    git add *
    git commit -m 'initial commit'
    git push -u origin master
  4. On macbook cd to Sites
  5. create CHILD.dev dir and cd there
  6. git clone https://github.com/martham/CHILD_REPO.git
  7. move up one level the repo dir and it’s .git dir

Plugins

See Plugins for more notes on plugins

  1. install, configure and test backupbuddy
    1. stash
    2. file limits
    3. email if no backup in X days
    4. schedule daily Full
  2. install , configure and test wordfence notes here
  3. install gravity forms
  4. install wp-less plugin
  5. install changeuser plugin
  6. install Show Current Template plugin
  7. install TinyMCE Advanced plugin and configure:
    1. uncheck Enable the editor menu
    2. rm font size
    3. rm font family
    4. add justify
    5. add underline
    6. confirm “tables” is there
    7. rm blockquote
    8. add strikethrough
    9. add copy and paste
  8. install Yoast SEO
    1. enable XML sitemap (w/ disable for Components)
    2. review which post tiles it applies to
    3. review which admin screens to include it on
  9. install Postman if necessary
  10. install Google Analytics plugin, if necessary
  11. install custom admin bar plugin (for quick links menu)
  12. install admin columns plugin
  13. install duplicate post plugin from wordpress.org
  14. install ubermenu3 plugin
  15. configure ubermenu (see https://trumpetvine-framework.com/ubermenu/)
  16. activate akismet (it’s a bit obfuscated these days – from the plugins alert section log into wordpress.com as martha, go through the “basic” set and when asked to pay move price slider to 0 – a key is then emails and back in the admin start over and paste it in)
  17. rm hello dolly plugin
  18. configure backups

Woocommerce

  1. install Admin Columns – WooCommerce add-on plugin

Admin

  1. in WP admin delete sample page and post
  2. create a main and mobile menu and assign them to the Primary and Mobile menu locations
  3. create a test page (About?) and add it to each menu. Test
  4. add First and Last name for martha user acct and set admin color scheme
  5. Create a “404 Text” page (or component) w/ url “/404-text”
  6. set up client user, incl:
    1. color scheme
    2. in Pages
      1. Screen options
        1. adjust total displayed per page
        2. turn off Yoast (if applicable)
        3. turn on revs
        4. turn on discussions
      2. confirm discussion off by default
    3. in Posts
      1. Screen options
        1. adjust total displayed per page
        2. turn off Yoast (if applicable)
        3. turn on revs
        4. turn on discussions
        5. turn on comments
      2. confirm discussion on by default
    4. Custom Post Types (incl Components)
      1. Screen options
        1. adjust total displayed per page
        2. turn off Yoast (if applicable)
        3. turn on revs
        4. turn on discussions
      2. confirm discussion off by default

 Other

  1. on Macbook add to versions script – in 2 places!