Our Suite of Developer Tools It's just a toolbox!
Daily Generator Token Meter Your counter starts at 0 each day.
0 / 25,000 daily meter
PHP & Bootstrap Developer Tool

Basic Page Setup

Build a clean PHP & Bootstrap page from scratch, starting with the basic file structure and adding components as you go.

PHP page file structure

Let's build a PHP Bootstrap website from scratch!

Let's start with the source code from the Basic Template and then we'll add some other components to your website. I'm assuming that you already have a server host that has provided you with an FTP connection to your domain account.

If you want to run a web site you need web hosting with the web servers and connections necessary to get your business online. There are many different varieties of web hosting, designed to meet different needs. A ten-page web site set up by an individual will need far less robust web hosting package than a multinational high-traffic site set up by a big company.

I can help you with a domain and hosting, if needed. Click Here
Start Here
Basic Page Setup


1. If you have not already done so, start by creating a file called "index.php"

<!--BEGIN COPY AND PASTE TO - index.php file-->

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page Title</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>

<div class="container py-4">
  <!--CONTENT GOES HERE-->
  <h1>Hello, world!</h1>
  <h2>Welcome to my website</h2>

  <div class="row">
    <div class="col-lg-12">
      <h3>Column 1</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </div>
  </div>
  <!--CONTENT ENDS HERE-->
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</body>
</html>

<!--END COPY AND PASTE-->

This is your first page setup. You can create other pages simply by copying this file and renaming the file to about-us.php or contact-us.php for example.

NOTE: Folders and file names are just suggestions. This element can and could be used for other things depending on your needs.


Now, we need to add a

Navigation Bar