WordPress Day 2 1 Day 1 Review Describe the difference between a - - PowerPoint PPT Presentation

wordpress
SMART_READER_LITE
LIVE PREVIEW

WordPress Day 2 1 Day 1 Review Describe the difference between a - - PowerPoint PPT Presentation

TWD 25 WordPress Day 2 1 Day 1 Review Describe the difference between a static website, a dynamic website, and a content management system. Describe the layers of a CMS like WordPress. Compare basic aspects of the most used content


slide-1
SLIDE 1

TWD 25

WordPress

Day 2

1

slide-2
SLIDE 2

Describe the difference between a static website, a dynamic website, and a content management system. Describe the layers of a CMS like WordPress. Compare basic aspects of the most used content management systems.

2

Day 1 Review

slide-3
SLIDE 3

Install a WordPress website on a local server. Configure and customize a WordPress website using the Twenty Twenty WordPress theme. Add content to a WordPress website.

3

Day 1 Review (cont’d)

slide-4
SLIDE 4

4

Morning Objectives

Install a WordPress website on a live server. Define the three primary reasons for using HTTPS. Migrate a WordPress website from a local server to a live server.

slide-5
SLIDE 5

5

Installing WordPress

  • n a Live Server
slide-6
SLIDE 6

6

Local Server versus Live Server

A local server is only on your computer and no one else can access it. A live server is “on the internet” so it can be accessed from any device. Now we are going to work on a live server...

slide-7
SLIDE 7

7

Live Server Features

Installing WordPress on a live server will generally involve…

  • cPanel (or something similar)
  • FTP
  • phpMyAdmin
slide-8
SLIDE 8

8

Installing WordPress - Steps (live server)

  • 1. Download and extract the core files

from WordPress.org.

  • 2. Login to your Portfolio Site's cPanel to:
  • a. Create a database
  • b. Create a username/password.
  • c. Add the user to the database.
slide-9
SLIDE 9

9

Installing WordPress - Steps (live server)

  • 3. Rename wp-config-sample.php to wp-config.php

and add the database name, username, and password to connect the files and database.

  • 4. Upload the whole WordPress installation folder to

your Portfolio via FTP (FileZilla).

  • 5. Open the site in a browser to begin the installation

process.

slide-10
SLIDE 10

10

Installing WordPress - Video (live server)

Download the video tutorial showing how to install WordPress on a live/remote server from the Program Files FTP server. 10-WordPress-Development / Video-Tutorials

slide-11
SLIDE 11

11

Step 1 - Download WordPress

Download & extract the core files from WordPress.org.

slide-12
SLIDE 12

12

Step 2 - Login to cPanel

cPanel is the Control Panel on many hosting servers. cPanel is your portfolio site’s online dashboard. cPanel access (replace “USERNAME”):

https://USERNAME.bcitwebdeveloper.ca/cpanel

Your password will be your BCIT ID.

slide-13
SLIDE 13

Databases in Hosted Environments

On a live/remote server, phpMyAdmin has no option to create or drop databases. Creating and deleting databases is done from MySQL Databases in cPanel.

13

slide-14
SLIDE 14

14

Step 2a - Create a Database

Name your database and click Create Database.

Note: Your database will begin with a prefix created by the server, you are only typing the end of the name.

slide-15
SLIDE 15

15

Step 2b - Create a User / Password

Create a user for this specific database. Use the password generator then copy/paste the password somewhere temporarily.

Note: Your username will begin with a prefix created by the server, you are only typing the end of the name.

slide-16
SLIDE 16

Database Users

Database Users ≠ WordPress Users Do NOT use your personal passwords for Database Users because anyone with access to your files can read it when you paste it into wp-config.php. Always use the Password Generator when setting passwords for Database Users.

16

slide-17
SLIDE 17

Database Users

Live/Remote

Database users are created by you for specific databases.

Local

MAMP - root / root WAMP - root / ‘’

17

slide-18
SLIDE 18

18

Step 2c - Add User to Database

Select the Username you created and the Database you created and click Add. On the next screen, check All Privileges, then click Make Changes.

slide-19
SLIDE 19

19

Step 2 - Confirm

Check under the Current Databases section. Verify that the Database User you created appears next to the Database name you created.

slide-20
SLIDE 20

20

Step 3 - Edit wp-config.php

In the newly extracted “wordpress” folder, rename wp-config-sample.php to wp-config.php. Add info from cPanel… ...don’t forget the prefix for the database name and user name.

slide-21
SLIDE 21

21

Step 3 - Edit wp-config.php

If you lost the password you can regenerate it in cPanel. Note: The hostname will almost always stay localhost even on a live/remote server.

slide-22
SLIDE 22

Hosted Environment - Logging In

Most hosting companies provide phpMyAdmin by logging into cPanel as a non-super user. Though it's on a remote server, it still gives the server name as localhost because MySQL and this phpMyAdmin are local to each other.

22

slide-23
SLIDE 23

Hosted Environment - Defaults

A server running MySQL version 5.5.3 or higher should have the server connection collation set to utf8mb4_unicode_ci. If earlier, it should be set to utf8_general_ci or utf8_unicode_ci.

23

slide-24
SLIDE 24

24

Step 4 - Upload the Folder

Rename the extracted wordpress folder and then upload the folder to your portfolio server with your FTP application (FileZilla).

slide-25
SLIDE 25

25

Step 5 - Install in the Browser

Open the site in a browser to begin the installation process. Access live site:

https://USERNAME.bcitwebdeveloper.ca/FOLDER

slide-26
SLIDE 26

26

Step 5 - Install in the Browser

Select the language, then fill in the details.

Note: If you are asked to input database details, then you have not created the wp-config.php file.

slide-27
SLIDE 27

27

Login to WordPress Admin

Add /wp-admin to the end of any WordPress site URL to access the admin dashboard.

Tutorial:

https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/admin-panel

slide-28
SLIDE 28

28

Installing WordPress - Tips

Always download and extract a new core file pack from wordpress.org. The database name/user/password is NOT the same as your WordPress site username and password. Do NOT use 'admin' as a WordPress username. Use longer and safe passwords.

slide-29
SLIDE 29

Hosted Environment - Upload Sizes

Check with your host to determine their default values for uploading files. Example: SiteGround sets it to 128MB but you can increase it by editing the php.ini file. http://php.net/manual/en/ini.core.php

29

slide-30
SLIDE 30

30

Securing Sites with HTTPS

slide-31
SLIDE 31

Securing Sites with HTTPS

Every website you upload to a server should be using HTTPS instead of the unencrypted HTTP. Let’s look at why this is needed and how to do this...

31

slide-32
SLIDE 32

HTTP

HTTP is not encrypted and is able to be read and manipulated by a third-party. For example:

  • Intercepting a form submission on a website.
  • Injecting malware or advertisements on a website.

32

slide-33
SLIDE 33

HTTPS

HTTPS adds another step before transmitting data: the handshake. The handshake verifies that the server and browser are both who they claim to be through the use of TLS/SSL Protocols and Certificates. Then data is transmitted in an encrypted connection.

33

slide-34
SLIDE 34

Why You Need HTTPS

Security - Encryption of data between the server and the browser. SEO - Google uses HTTPS as a ranking factor. Performance - Every major browser requires HTTPS to use HTTP/2.

34

slide-35
SLIDE 35

Let’s Encrypt

Let’s Encrypt launched in December 2015. It’s a service that generates free and auto-renewing TLS/SSL Certificates. Many hosting providers use Let’s Encrypt:

https://community.letsencrypt.org/t/web-hosting-who-support-lets-encrypt/6920

35

slide-36
SLIDE 36

Create the Certificate

  • 1. Login to cPanel on your server.
  • 2. Switch your cPanel theme to x3.
  • 3. Scroll to the Security section and

click on Let’s Encrypt.

36

slide-37
SLIDE 37

Create the Certificate

  • 4. Select your domain.
  • 5. Choose an SSL Type.
  • 6. Click Install.
  • 7. Wait for the certificate to install.

37

slide-38
SLIDE 38

Force HTTPS

1. Edit the .htaccess file from your WordPress directory. 2. Add the following code to the top of the .htaccess file and upload the file:

38

Note: Copy code from https://wp.bcitwebdeveloper.ca/instructor/force-https/

slide-39
SLIDE 39

Always Use HTTPS

Every website you make going forward should be served over HTTPS and forced to only use HTTPS. If a hosting provider doesn’t offer free TLS/SSL Certificates… find a different hosting provider.

39

slide-40
SLIDE 40

40

Migrating WordPress Websites

slide-41
SLIDE 41

Migration Types

New Server, New Domain

Example: localhost/website to website.com Example: website.com to new-website.com

New Server, Same Domain

You switch hosting services but URLs remain the same

Same Server & Domain, New Folder

Example: Rename folder Example: Move site from a subfolder to the root

41

slide-42
SLIDE 42

New Server, New Domain

This is a full migration. For example... Local server to remote server: localhost/website to website.com Remote server to a different remote server: website.com to new-website.com

42

slide-43
SLIDE 43

Local Server to Remote Server

Let’s migrate the Vancouver site from our localhost server to our live server. Note: If you haven’t finished the tasks from yesterday you can still do them after the migration so please follow along.

43

slide-44
SLIDE 44

WP Migrate DB Pro

We will use the paid WordPress plugin WP Migrate DB Pro provided in the Program Files FTP. Please download all three zipped folders now.

44

slide-45
SLIDE 45

WP Migrate DB Pro

WP Migrate DB Pro allows us to connect WordPress websites so we can Push and Pull databases and files between both WordPress websites. We will treat our localhost site like a staging or development site, and our remote site like a production or live site.

45

slide-46
SLIDE 46

46

Migrating WordPress - Steps

  • 1. Install the three WP Migrate DB Pro plugins and

enter the license key on both WordPress websites.

  • 2. On the remote site…
  • a. Copy the Connection Info.
  • b. Toggle on Push.
slide-47
SLIDE 47

47

Migrating WordPress - Steps

  • 3. On the local site:
  • a. Select Push then paste in the Connection Info.
  • b. Choose your settings for Media, Plugins &

Themes and Push.

  • 4. Check the remote site for the changes.
slide-48
SLIDE 48

48

Step 1 - Install Plugins

Go to Plugins → Add New. Click on Upload Plugin. Click on Choose File and Install the plugin. Repeat for all three plugins. Do this on both sites!

slide-49
SLIDE 49

49

Step 1 - Add License Key

Go to Tools → Migrate DB Pro → Settings. Copy and paste the provided license key into the Your License field

  • n both sites.
slide-50
SLIDE 50

50

Step 1 - Confirm Plugins Updated

Confirm that all three plugins are activated and up-to-date on both sites.

slide-51
SLIDE 51

51

Step 2 - Remote Site

On the remote site, go to the Settings tab:

  • Copy the Connection

Info.

  • Toggle on the Push

permission.

slide-52
SLIDE 52

52

Step 3a - Local Site

On the local site, go to the Migrate tab:

  • Select Push.
  • Paste in the

Connection Info.

slide-53
SLIDE 53

53

Step 3b - Local Site

Choose your settings for:

  • Media
  • Themes
  • Plugins

Check Save Migration Profile then click Push & Save.

slide-54
SLIDE 54

54

Step 4 - Check Remote Site

Go to the remote site on the live server and it should be identical to the local site. Note: After clicking Push, the remote site database is wiped completely. Your WordPress login for the remote site will now be the same as the local site.

slide-55
SLIDE 55

55

Migrating WordPress - Video

Use the following tutorial to review these steps and the WP Migrate DB Pro interface. Tutorial:

https://www.linkedin.com/learning/wordpress-migration/migrate-with-wp-migrate-db-pro

slide-56
SLIDE 56

New Server, New Domain

This is a full migration. For example... Local server to remote server: localhost/website to website.com Remote server to a different remote server: website.com to new-website.com

56

slide-57
SLIDE 57

New Server, Same Domain

If you have a new hosting provider but you are keeping your domain name the same. All of the previous steps apply.

57

slide-58
SLIDE 58

Same Server & Domain, New Folder

Example 1: example.com/new to example.com Example 2: example.com/new to example.com/old Move your WordPress installation into the desired directory on the server or rename the directory. Use the Search Replace DB tool to update all URLs in the database.

58

slide-59
SLIDE 59

Search Replace DB Tool

Download and extract the Search Replace DB tool:

https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Upload the folder to the root of your WordPress installation and rename it something easy to type.

59

slide-60
SLIDE 60

Search Replace DB Tool

Navigate to that folder in your browser. Fill in only the first two fields. Click “dry run” to test. Click “live run” to run the search and replace.

60

slide-61
SLIDE 61

Search Replace DB Tool

Here is an example of what to type into the two fields: Search for: example.com/vancouver Replace with: example.com/vancity

61

slide-62
SLIDE 62

Search Replace DB Tool

After using Live Run, login to your WordPress site. Go to Settings → Permalinks and click Save

  • Changes. (No need to change anything on that page).

This will flush the permalinks and make sure all of your links work.

62

slide-63
SLIDE 63

63

Search Replace DB Tool - Video

After the program, you will not have access to the WP Migrate DB Pro plugin unless you purchase it yourself. You can use the Search Replace DB Tool to do a manual WordPress migration. A video tutorial is provided in the Program Files FTP server. 10-WordPress-Development / Video-Tutorials

slide-64
SLIDE 64

64

Morning Objectives

Install a WordPress website on a live server. Define the three primary reasons for using HTTPS. Migrate a WordPress website from a local server to a live server.

slide-65
SLIDE 65

Install WordPress themes and plugins from the WordPress directory. Create user accounts on a WordPress website. Complete and submit WordPress Site #1.

65

Afternoon Objectives

slide-66
SLIDE 66

66

WordPress Plugins

Plugins are custom functions created to extend the core functionality of WordPress. Developers create them and post them on the wordpress.org plugin directory where you can find information and reviews, and download them. If you add the functionality and you don't like it you can simply deactivate and delete the plugin.

slide-67
SLIDE 67

67

WordPress Plugins - Exercise

Let’s install the Contact Form 7 plugin: https://wordpress.org/plugins/contact-form-7/ Create a Contact page and add the Contact Form to that page.

slide-68
SLIDE 68

68

WordPress Plugins

If a plugin ever breaks your WordPress website, simply delete the files by going to… wp-content/plugins/ ...find the offending plugin and delete the folder.

slide-69
SLIDE 69

69

WordPress Plugins

To review what WordPress plugins are and what they are capable of, check out the tutorials below.

Tutorials:

https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/plugins-what-they-are-and-how-they-work https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/install-activate-and-manage-plugins

slide-70
SLIDE 70

70

WordPress Themes

A WordPress theme is the collection of files that decides what your website looks like on the front end and how it behaves. WordPress core developers create well coded and responsive themes that ship with WordPress: Twenty Twenty, Twenty Nineteen, Twenty Seventeen, Twenty Sixteen, etc...

slide-71
SLIDE 71

71

WordPress Themes

By changing the theme, you're changing not only the appearance of your WordPress site but often also adding, augmenting, or subtracting functionality. Always look through the theme documentation,

  • ptions, and reviews.

WordPress Themes Directory: https://wordpress.org/themes/

slide-72
SLIDE 72

72

How to Choose a Theme

Free themes – Only use themes from the WordPress.org directory if you want a free theme. Premium themes – Many work great. Some have special theme options and customizations built in that can break your content if switching themes later.

slide-73
SLIDE 73

73

WordPress Themes - Exercise

Let’s install the Twenty Twelve theme: https://wordpress.org/themes/twentytwelve/ Activate the theme and check the front end of your website to see the differences. Then switch back to the Twenty Twenty theme.

slide-74
SLIDE 74

74

WordPress Themes

To review what WordPress themes are and what they are capable of, check out the tutorials below.

Tutorials:

https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/themes-what-they-are-and-how-they-work https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/preview-install-and-activate-a-theme

slide-75
SLIDE 75

75

WordPress Users & Roles

Every User account on a WordPress site must be assigned a Role. Roles give the site owner the ability to control what users can and cannot do within the site. WordPress has six predefined roles with specific capabilities...

slide-76
SLIDE 76

76

WordPress Roles & Capabilities

Administrator – access to all the administration features within a multisite / single site. Editor – can publish and manage posts including the posts of other users. Author – can publish and manage their own posts. Contributor – can write and manage their own posts, but cannot publish them. Subscriber – can only manage their profile.

slide-77
SLIDE 77

77

WordPress Roles & Capabilities

Subscriber Contributor Author Editor Administrator Manage profile Write own posts Publish & edit own posts Manage all posts Manage all settings Manage admin settings

slide-78
SLIDE 78

78

WordPress Roles & Capabilities

More information on Roles and Capabilities:

https://wordpress.org/support/article/roles-and-capabilities/

slide-79
SLIDE 79

79

WordPress Users & Roles - Exercise

Let’s create a second user account on our website with the role of Author. Use an incognito or private browsing window to login with this second account and see what the Author role is capable of doing.

slide-80
SLIDE 80

80

WordPress Users & Roles

To review what WordPress users and roles are and and the how to use them properly, check out the tutorials below.

Tutorials:

https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/how-wordpress-handles-users https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/add-and-manage-users

slide-81
SLIDE 81

81

WordPress User Accounts

To change the email address, password, name, and more for your account or any other account on your WordPress site, use the tutorial below...

Tutorials:

https://www.linkedin.com/learning/wordpress-5-essential-training-site-administration/user-profiles

slide-82
SLIDE 82

Install WordPress themes and plugins from the WordPress directory. Create user accounts on a WordPress website. Complete and submit WordPress Site #1.

82

Afternoon Objectives

slide-83
SLIDE 83

83

Assignment - WordPress Site #1

Create a WordPress Site Configure WordPress Add Content to WordPress Add WordPress Plugins Select a WordPress Theme Create a WordPress User Migrate the WordPress Site

slide-84
SLIDE 84

84

Assignment - WordPress Site #1

If you have not already, complete all of the tasks listed

  • n the Day 1 slides.

After that, follow the steps here:

https://wp.bcitwebdeveloper.ca/instructor/assignment-wordpress-site-1/

slide-85
SLIDE 85

85

WordPress - Day 3 Setup

Before class tomorrow, please setup another local WordPress site according to the next slides and the video tutorial provided in the Program Files FTP server: 10-WordPress-Development / Video-Tutorials Give yourself 30 - 45 minutes this afternoon or this evening to complete this setup.

slide-86
SLIDE 86

86

WordPress - Day 3 Setup

  • 1. Create a new WordPress installation on your local

server.

  • 2. Rename the extracted ‘wordpress’ folder to

‘mindset’. (If on Windows, make sure you do not have this folder nested!)

  • 3. Install WordPress.
slide-87
SLIDE 87

87

WordPress - Day 3 Setup

  • 4. Download a copy of the TWD Starter Theme.

a. https://wp.bcitwebdeveloper.ca/instructor/site-content/twd-starter-theme.zip

  • 5. Rename the extracted twd-starter-theme folder to

mindset-theme, copy it into the themes folder.

  • 6. Activate the theme in WordPress.
  • 7. Adjust the Timezone and Permalinks in the

WordPress Settings.

slide-88
SLIDE 88

88

WordPress - Day 3 Setup

  • 8. Create 6 Pages: Home, Blog, Work, Services,

About, Contact.

  • 9. Create 4 Posts with Featured Images. Use Lorem

Ipsum and the provided images:

a. https://wp.bcitwebdeveloper.ca/instructor/site-content/mindset-images.zip

  • 10. Create a Menu / Navigation for the header.
  • 11. Set the Homepage to Home and Posts page to

Blog.

slide-89
SLIDE 89

89

WordPress - Day 3 Setup

  • 12. Install the following plugins:

a. Reveal IDs - https://wordpress.org/plugins/reveal-ids-for-wp-admin-25/ b. Show Current Template - https://wordpress.org/plugins/show-current-template/

That’s it! You’re all set for tomorrow!