How-to d8 database site - Page One

Throwing this up real quick will make it much better...ed


Try Drupal 8:

last update: July 5, 2018 4:45p
Author: Randy Poole

  1. Domain and Hosting.
  2. Hosting Company's client area's.
  3. Set up SSH.
  4. Once in cPanal's "File Manager".
  5. Make Database.
  6. Move public/private upload files folders.
  7. Trusted Host setup.
  8. Loading drupal 8.
  9. Some of the errors that can occur on a drupal 8 install.
  10. Change who can register.
  11. Make some basic pages.
  12. How to make basic page.
  13. Move menu tabs around.
  14. Hit counter on Your page.
  15. Make ei button.
  16. Make Billboard page Taxonomy.
  17. Make Billboard page.
  18. Billboard fields to add.
  19. Make alphabetical display view.
  20. Make category display view.

  1. Domain and Hosting: Most hosting will have an domain search to see if it is available, then an way to purchase it. When buying hosting You want Linux maybe the mid package around $13.00 to start. After You start getting over 30k or so unique visitors a month You will need to start thinking to up Your net-pipe. You want cpu power not unlimited databases or emails, You only need 1 db and maybe 4 emails or You can use Your own email and not need any emails. i think the digital drives are a bit faster so look for them, plus it means the server has more current gear. You will also need to purchase an SSL or TSL(next gen of SSL.) certificate. You will have to decide whether to buy the higher monthly cost hosting that has an SSL or buy one separate.
    Notes: Make sure You put the domain name in the correct owners name for legal stuff.
    If You do not do the drupal setup under https:// over http:// You are sending All Your database info unprotected, ripe for a man-in-the-middle-attack. Building on sand if You continue, and yes i have deleted everything and started over many times for forgetting.

  2. Hosting Company's client area's: Will be different but for the most part they will have a place for the domain set up and a place for the hosting set up. If You buy the 2 at the same time they will connect Your hosting and domain so no real need to mess with the domain. In the hosting area most host will use cPanal You might go right into cPanal. Once in cPanal click on "file manager". This is where You will upload Your drupal 8 files.

  3. Set up SSH: .

  4. Once in cPanal's "File Manager": Go into "Public HTML files". Then go to scroll down to the bottom click on "Core Files" click on drupal 8 then click on the zip file to download core files. Then go back to "File Manager" and in the "Public Html Files" click on "upload file" at the top. Then chose the drupal zip file from Your computer, once done hit the back button. Now select the drupal zip file and click on "extract" onces extracted go into the drupal folder and "select All" and then click "move" and send to /   .

  5. Make Database: From cPanel chose "databases", then "make database" name it. i use something like "pennov2017build3" 16 digits only use lower case no symbols to be safe (long story.). Now make database user click "make user" for name i will use something like "zzduserpendl2017" . For the password i will use something like "zs33Re%%ryyoO0as" hit save. Then You need to connect the user to the database. Click "add user to database" , Match the 2 we just made. For user permissions check - select, insert, update, delete, create, drop, index, alter, create temp tables, lock tables then hit save. When we load drupal we will enter the database name, database user name and database user password. Some host will use a different server for the database, You will need that address also otherwise if the database is on Your server You will use "localhost" for the database address.


  6. Move public/private upload files folders You want to make changes to the default.settings.php file before You install drupal. Theoretically someone can spoof Your admin cookies and wget Your settings.php file as soon as You change the permissions. So before You install drupal go into sites/default and edit the default.settings.php file Your database name/user name/password is not in there yet. i do not remember if You have to change the default folder and default.settings.php permissions or not, if You can not save it after editing then You do. One more thing when moving Your site if You put everything in the sites folder it can get very large so lets make line 539 # $settings['file_public_path'] = 'sites/default/files'; too $settings['file_public_path'] = 'pubfilsz/filez2'; and and line 554 too $settings['file_private_path'] = 'privitfilez/filespiv'; You can see You can name or put them any where and drupal will make them also You might of notice drupal changes default.settings.php to settings.php after the install, just a note. There is one more change to the default.settings.php file before You install drupal and that is the “trusted host”.

  7. Trusted Host setupThis is a perfect example of why open source bets all propriety. Part of drupals security layers, it is required so if You do not do it, it will show a warning on Your dashboard. Go to sites/default/ edit default.settings.php go to line 738 copy
    $settings['trusted_host_patterns'] = array(
    * '^example\.com$',
    * '^.+\.example\.com$',
    * '^example\.org$',
    * '^.+\.example\.org$',
    * ); now You have to paste it inbetween a */ and /** these are starting and ending tabs of code not being used. Then remove the * from Your paste and if Your just one domain delete the bottom 2 lines:
    $settings['trusted_host_patterns'] = array(

    hit save, there are other things we can do like redirect to https or redirect to no www in the address.

  8. Loading drupal 8. You have drupal 8 uploaded and moved to the root of the server. You have Your database name, address, user name and user password. Now go to Your URL . You should see the drupal load screen. First "standard or plain" install. We want "standard" it gives us some pre made stuff that we need like the "views/glossary" that we will duplicate. Made by the people who made views, it does not get any better than that. "plain" has nothing turned on bare bones (people are doing tripy stuff w/ drupal like stripping all the stuff they do not need and maybe making a dedicated emailer w/ database support.). Then language will come up (may be language is first?) . Now comes the server check do not freack out because You got a lot of errors, it is just drupal doing it's job and all can be easily fixed...ed


  9. Some of the errors that can occur on a drupal 8 install. PHP requirements from The thing about the net's software. Always go for the newest version because it is always moving to the next fast. They are already working on drupal 9. So go for PHP 7.2 . cPanel has different modules that can be loaded. Look thru all the buttons to see if You can see an PHP version button it's usually at the bottom. If so go in and change the version. If not You need to send in an service ticket to Your hosting provider, tell them Your loading drupal 8 and need PHP 7.2 most host will get on these request pretty quick a day or so, O there are more errors to go over, a big one is OPcache everyone are starting to use this in there modules if it is not loaded as an PHP module You will get a bunch of errors, if You read the errors You will notice some say OPcache PHP module not loaded.

  10. Change who can register: "Configuration/Account settings". Change registration to administrator only.

  11. Make some basic pages: "Content/Add content/Basic page" Make a alpha page, cat page eve page, and databucks page, editor page, ad page, questions page.

  12. How to make basic page: "Content/Add Content/Basic page" ad title "alpha", In Body i added "Directory in alphabetical order."...In Menu settings i made an alpha "main navigation" menu tab...In "URL Path Settings" "/alpha" hit "save"...Then repet for other pages.

  13. Move menu tabs around: "Structure/Menus/Main navigation" and just move them around.

  14. Hit counter on Your page: "Extend" scroll down and check "Statistics" click "save", then go to "Configuration/Statistics" turn on "Count content views", Then go to "People/Permissions" scroll down to "Statistics" check "Anonymous User" for "View content hits" click save.


  15. Make ei button: Go to "Structure/Block layout/Custom block library/add custom block here is the JS it is just a simple JS alert box. JS is client side which means it does not have to talk to the server so it works on every thing and instantly plus pure JS the program is pre loaded in Your browser so it does not need to load. Save it as full html oops back up before You paste the JS select "Full HTML" because it resets it self and You have to paste it in the "Source" plus remove the <code></code> i used them to be able to post out side the "Source" . Then to go to "block lay out" after Your save, go down to "content" then click "place block" chose the block by the title You gave it "Configure block" comes up i do not want the title to show so uncheck that. Then click pages, i want to "Show for the listed pages" i want it on alpha and cat. Enter one path per line like   /alpha   then the next line    /cat  then hit save. If You want to move it up just left click hold and move it up or down on the "Block Layout" page.

    <code><p style="color:red;"><button onclick="myFunction()">ei</button></p>
    function myFunction() {
        alert("Pendleton Oregon\nEmergency Information\n\nEmergences: Dial 911\n\nFire#1: 541-276-1442\n\nFire#2: 541-276-1440\n\nPolice: 541-276-1411 \n\nState Police: 541-278-4090\n\nSheriff: 541-966-3600 \n\nAmbulance-Fire#1: 541-276-1442\n\nAmbulance-Fire#2: 541-276-1440 \n\nClinic Harrison: 541-215-1564 \n\nMedical St. Anthony: 541-276-5121\n\nTowing: will post more hold on\n\nTowing Schillings: 541-276-9705\n\nTowing Taylor: 541-276-6590 \n\nDepression Hotline: 541-523-5903\n\nPoison Emergencies: 1-800-222-1222\n\nPublic Works: 541-276-3078\n\nCity Admin: 541-966-0201\n\nOR Dept Fish and Wildlife: 503-947-6000\n\nFire Map:");

  16. Make Billboard page Taxonomy i have studied these open source web site apps for years i go back to zencart. Now You will see why d8 is the best, it's the design. Before we make the database record billboard page we will need to add an taxonomy field for the cat page so we can display the records by tags. Go to Structure/Taxonomy/Add vocabulary i named it Cat did not use the description. Then click "list terms" or "Add terms" and add a few terms like "beer" and "internet" i kept them lower case but it does not matter. put nothing in the description, "Relations" is root, then for the "URL alias" i made it "/cat/beer" i added the /cat/ folder so i can add a block later and assign it to only /cat/* .

  17. Make Billboard page Go to “Structure/Content types/Add content type” for the name i put Billboard same for the description. Then “Publishing options” i un clicked “Promoted to front page”. Then “Display settings” i un-checked “Display author and date information Author username and publish date will be displayed.” then click “Save and manage fields”. You will notice Your under the “Manage fields” tab now let’s click “+ Add field” “-Select a field type-” let’s add the taxonomy field we just made, go down and select “Taxonomy term”. Next this “Label” can be shown on the web page i used “cat term” then “Save and continue”. For the “Allowed number of values”, this will be how many categories will You allow a business to have? i’m going with 6, “Save field settings”. Now the “Help text” i put “enter category term.” clicked “Required field”, checked “Create referenced entities if they don't already exist” then checked “cat” Vocabulary and clicked “Save settings”.

  18. Billboard fields to add. First field is the most important i call it the Rolodex, in honor of Rolodex's contribution to business. Complying with's use we are using json-ld and RDFa. The zeda search will double check the data is the same. by using json we make an JS object that we can do all kinds of stuff like making a module that i just slide this rolodex into a box and it makes an billboard record. Will be updating this. Go to "Structure/Content types then click manage fields for Billboard". Then click "Add field" then "Select field type" then chose "Text, formatted, long" then fill in name, this can be shown on web page. i am calling it "rolodex" hit save. Number of values, "1" hit save. In help text i put, this is shown to who fills in field. "Fill in appropriate information.". Clicked "Required field" for "default Value" click "Full Html" then "source" and paste without the code tags, :<code><script type="application/ld+json">
    "@context": "",
    "@type": "LocalBusiness",
    "address": {
    "@type": "PostalAddress",
    "addressLocality": "Pendleton",
    "addressRegion": "OR",
    "streetAddress": "Cheif Joseph Spur"
    "description": "Our Objective is to raise the income of the Human Race.",
    "name": "",
    "telephone": "541-633-9323",
    "geo": {
    "@type": "GeoCoordinates",
    "latitude": "45.64770",
    "longitude": "-118.81743"
    "sameAs" : [ "",

    ⁢<div vocab="" typeof="LocalBusiness">
      <h1><span property="name"></span></h1>  
    <span property="description"> Our Objective is to raise the income of the Human Race.</span>
      <div property="address" typeof="PostalAddress">
        <span property="streetAddress">Chief Joseph Spur</span>
        <span property="addressLocality">Pendleton</span>,
        <span property="addressRegion">OR</span>  
    </div>   Phone: <span property="telephone">541-633-9323</span><
    ⁢/div> <a href="" property="url"></a>  </code>

    Next let's add a link field for the label i called it "website" this label can be shown. i went with 3 values. Put "Website URL.". in help text, made it "not required", Allowed link type "Both". Allow link text "optional" hit save. Then go to "Extend" and turn on the telephone field module. Make an telephone field, i made the label "phone" (i make my labels lower case because i want too. Hit save, i made it 2 values, hit save, put "Phone number" in help text, not required, hit save. Now an email field, i made it 2 values, hit save. Now lets make a text field for "main lat/lon 3' from door." and "door 2 lat/lon 3' from door". So "add field" You want "text (plain)" i used "main lat/lon 3' from door" for label, hit save, i made the max length 255, with one value. put "main lat/lon" in help text, then repeated for door 2. Next we want to add the link to lat/lon map. Add field select "link", my label "map lat/lon" save, only want 1, in the help text i put "Ad this to the rest of the url" and "45.67021_-118.79145_marketstone_hi-mom_http://marketstone.com_" then i the default value i put "" and in the default text i put "bing map" then save. We added the cat term above. Now lets add 5 images, last time the multi-image had a bug so im going with 5 separate images. Will add the AR in a bit still doing experiments.

  19. Make alphabetical display view.  Lets add two records for the terms we made mine are internet and beer. Go to "Content/Add Content/Billboard" and fill out the record, when making a billboard record You need to fill out the "URL PATH SETTINGS" like "bb/MarketStone.comet" i made the bb folder so i can later make a block to all the bb. We haven't yet "Manged the Display or Form Display we might have to do that, it's in "Content Type/Billboard/Manage Fields". Views is a little more, will get back to this. Basically copy glossary change filter to "Content type" "Billboard" change fields to "billboard" "website" "phone" and "cat". make URL something different, make block but move it up after page it can not be after attachment, Attachment is part of how glossary is made. i think thats all will update this.

  20. Make category display view. We will kind of do the same thing here but the fields are different.

  21. Make zam zeda ad machine. First will make a new contenttype "ads" We are doing ads "clean" and thats better then "sick" Are ads are color toned down on page, if someone clicks it goes to there ad page, that we will leave up for 3 months after ad runs. We could make it 2 months or forever, at 3 months we hope it becomes a thing "O i have to run my ad at least every 3 months". When people click to ad page the ad client wants to know how many of those are bots and are hosting stats tell us that. Drupal might have one of the best "user authentication" on earth. click on the page several times You will see it only changes the views once because drupal uses many things one being Your ip. Next we will load the calendar module, turn it on in "Extend", will come back to this because we just had a calendar 8 update July 5th will see whats up. Next make a role at "people/roles" make a new ad-guy role then into "permissions" and give the ad-guy role permissions to edit calendar. i plan to make deals with other editors if ad space in the calendar is free they just fill in what they need after a pre made agreement on cost. Plus the ad calendar is the place people can go back and look at old ads for 3 months.