Double click to toggle Read Mode.

WordPress Guide

Github Link

Bidur Sapkota Bidur Sapkota

WordPress Guide by Bidur Sapkota

Table of Contents

  1. Install WordPress with XAMPP
  2. Initial WordPress Setup Process
  3. Lab 7 - WordPress

Install WordPress with XAMPP

Initial WordPress Setup Process

  1. Install WordPress on host or local machine
  2. Setup Privacy Page via Settings -> Privacy menu
  3. Install WP AUTOTERMS and create the Terms and Conditions page.
  4. Install WP Forms Lite and create a Contact Form.
  5. Install Yoast SEO (sitemap wont work on local install but SEO features work fine).
  6. Install UpdraftPlus for backups, but only recommended for Web hosted WordPress, not local installs.
  7. Install All In One Security & Firewall, on web host installs only.
  8. Delete Hello World Post.
  9. Delete Sample Page.
  10. Change default category from Uncategorized to something more useful.
  11. Cleanout any plugins WordPress installed automatically, e.g. Hello Dolly.
  12. Install the theme you want to use, and delete any unused themes.
  13. Go through settings menus and check basics are correct.
    1. General Settings: Admin email is correct
    2. Reading Settings: Summary is checked and search engine visibility is correct.
    3. Discussion: Uncheck “allow link notifications”, “a comment is held for moderation”, “comment author must have previously approved comment” and Check “Comment must be manually approved”.
    4. Set Gravatars as required.
  14. Setup Gravatar
  15. Permalinks
  16. Clear out Widgets You should now have a blank WordPress set up and ready for you to start building your site.

Old Question:

What is difference between WordPress theme and template? Write the steps to add and edit pages in WordPress.

WordPress Theme:

WordPress Template:

In Summary: A theme is the complete package, while a template is an individual file within that theme.


Steps to Add Pages in WordPress

  1. Login to WordPress Admin Dashboard

    • Navigate to your-site.com/wp-admin
    • Enter your username and password
  2. Access Pages Section

    • Click on "Pages" in the left sidebar menu
    • Click on "Add New" or "Add New Page"
  3. Enter Page Details

    • Add a title in the "Add Title" field
    • Add content using the block editor (Gutenberg) or classic editor
    • Add images, videos, or other media as needed
  4. Publish the Page

    • Click the "Publish" button
    • Confirm by clicking "Publish" again

Steps to Edit Pages in WordPress

  1. Navigate to Pages List

    • Go to WordPress Dashboard
    • Click on "Pages" → "All Pages"
  2. Select Page to Edit

    • Hover over the page you want to edit
    • Click "Edit" link that appears below the page title
    • Or click directly on the page title
  3. Make Changes

    • Modify the title, content, or media as needed
    • Update page settings or template if required
    • Add or remove blocks in the editor
  4. Update the Page

    • Click the "Update" button to save changes
    • The page will be updated immediately on the live site

Old Question:

What is Widgets?

Widgets are small blocks or modules that perform specific functions and can be added to different areas of a website (typically sidebars, footers, or headers). They provide dynamic content and functionality without requiring coding knowledge.

Common Widget Examples:


What is CMS? Explain different Features of CMS.

CMS (Content Management System) is a software application that allows users to create, manage, modify, and publish digital content without requiring specialized technical knowledge or coding skills.

Key Characteristics:

Popular CMS Examples:

Benefits:

Different Features of CMS

1. User Management

2. Content Creation and Editing

3. Theme and Template Management

4. Plugin/Extension System

5. SEO Features

6. Media Management

7. Multi-language Support

8. Version Control

9. Security Features

10. Workflow Management


Old Question:

Write the steps to create submenu in WordPress or Joomla?

  1. Access Full Site Editor

    • Login to WordPress Dashboard
    • Navigate to Appearance → Editor
  2. Select Header Pattern

    • Click Pattern → Header
    • Choose your header template part and click to edit
  3. Add New Custom Page List

    • Expand items in header. Find page list and add new custom link. Add name All and give link # for now.
    • Create new custom link content1 and content2.
  4. Append sublink to parent link

    • Go to navigation and indent sublinks to right of parent link by dragging.
    • Remove # from parent link.
  5. Save Changes

    • Click "Save" button

Visual Hierarchy:

Parent Menu Item Submenu Item 1 Submenu Item 2

Old Question:

Discuss about MVC architecture with appropriate diagram.


MVC Architecture

MVC (Model–View–Controller) is a software architectural pattern used for designing applications by separating them into three interconnected components:

MVC Architecture

1. Model

Example: A User class that deals with user data, database queries, etc.


2. View

Example: HTML pages, templates, or UI screens.


3. Controller

Example: A UserController that receives a login request, asks Model to verify data, and returns a View.


How MVC Works (Flow)

  1. User interacts with View (click, submit form).
  2. Controller receives the request.
  3. Controller calls Model to get or update data.
  4. Model returns data to Controller.
  5. Controller updates the View.
  6. View displays the response to the user.

Benefits of MVC

1. Separation of Concerns

Each component has a separate responsibility → code is easier to write, test, and maintain.

2. Reusability

Models and Views can be reused across different parts of the application.

3. Scalability

MVC supports large applications by breaking them into manageable components.

4. Easier Testing

Since logic is separated, unit testing becomes simpler.


Real-World Examples

Lab 7 - WordPress

Theory

Practical