How to Build a Website With ChatGPT

Using AI to Create a WordPress Site From Scratch

How to Build a Website With ChatGPT

To start, we asked ChatGPT to create a simple website outline for a small web development business that consists of at least five pages.

A website outline generated by ChatGPT

ChatGPT provided us with a simple outline and some brief explanations about what each page should contain. Users can use this recommendation as the basis for their sitemap.

Furthermore, you can expand this recommendation to make it more applicable to your site. For example, we asked the AI model to write homepage elements, including the hero title, tagline, and call-to-action (CTA) button.

ChatGPT homepage elements recommendation

Additionally, the AI model can help with some essential website elements like a web hosting provider or WordPress business themes based on your needs.

WordPress theme recommendations from ChatGPT

These website ideas can streamline the initial research process by narrowing your options. Remember to conduct further research before applying them to your web development project.

Design Your Site with AI

The next step is to test whether the ChatGPT bot can create code for basic web pages.

In this example, we asked AI to write lines of HTML code to create some of the pages we needed. The first prompt is to make a homepage using Bootstrap responsive design.

Prompt: Create a homepage template using Bootstrap responsive design. Include the menu for the homepage, services, portfolio, blog, and about us on the header.

<!DOCTYPE html>
<title>My Blog</title>
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<script src=""></script>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">My Website</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.html">Home</a>
<li class="nav-item">
<a class="nav-link" href="services.html">Services</a>
<li class="nav-item">
<a class="nav-link" href="portfolio.html">Portfolio</a>
<li class="nav-item">
<li class="nav-item active">
<a class="nav-link" href="blog.html">Blog</a>
<li class="nav-item">
<a class="nav-link" href="about.html">About Us</a>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="card">
<img class="card-img-top" src="" alt="Card image cap">
<div class="card-body">
<h4 class="card-title">Blog Post Title 1</h4>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Read More</a>
</html><div class="open_grepper_editor" title="Edit & Save To Grepper"></div>

The chatbot successfully answered a follow-up question and generated lines of code as prompted. This code also works when we load it on a browser.

Website blog page example using a card layout

Aside from writing code for web page templates, the chatbot can also generate specific elements. Here is an example of how the chatbot creates a simple contact form.

Prompt: Create a simple web page containing a contact form. Include the following fields: name, email address, and phone number.

<!DOCTYPE html>
<title>Contact Form</title>
<link rel="stylesheet" href="" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<div class="container">
<form action="submit-form.php" method="post">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" id="name" name="name">
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email" name="email">
<div class="form-group">
<label for="phone">Phone number:</label>
<input type="tel" class="form-control" id="phone" name="phone">
<input type="submit" class="btn btn-primary" value="Submit">
<script src="" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
</html><div class="open_grepper_editor" title="Edit & Save To Grepper"></div>

Note that this code also uses Bootstrap, even though we didn’t specify it on the prompt. To make sure the code works, we have tested it using Replit:

Contact form code testing on Replit

Users may also use the AI model to generate CSS code to adjust specific design elements such as fonts, website color schemes, and element sizes.

Consider integrating the ChatGPT scripts with existing WordPress themes and templates. This way, you don’t have to create templates and layouts from scratch and can focus on adding new design elements to your pages.

Simple Custom CSS plugin banner

You can insert custom CSS code into a WordPress theme, including using the built-in customizer feature, creating a child theme, or using plugins like Simple Custom CSS and Custom CSS Pro.

Generate Site Content with ChatGPT

Due to its language processing capabilities, using ChatGPT for website content generation is one of its most common uses. The AI can generate ideas and drafts in a matter of seconds, saving you time.

We will use the model to create content for static pages and blog posts.

Let’s start by asking ChatGPT to write static content like the About Us page. Make sure to include all important information about your website and business in the prompt to let the chatbot understand the context.

About Us content generated by ChatGPT

You can also use ChatGPT for blogging and writing blog posts for your website. You can include specific phrases based on your keyword research to make the blog more SEO-friendly. Here, we asked it to generate one about choosing a good domain name.

Sample blog post generated by ChatGPT

If you have a specific audience demographic in mind, tell the AI model to create the website content with a specific language style to match its characteristics and expertise level.

For example, you can ask the chatbot to explain the same topic in a simpler language for eighth-grade students.

A simplified explanation of domain name generated by ChatGPT

It is also possible to use this AI model to help you create other content formats, such as videos or podcasts. This way, a user can quickly generate a script, although they may need to make some adjustments to the style and format.

Video content script generated by ChatGPT

Keep in mind that ChatGPT and other AI content generators can’t write perfect content for your website. Human proofreading and editing are still crucial to ensure high-quality posts.

Limitations of Using ChatGPT to Build a Website

Although it exceeds the capability of existing AI-powered tools, ChatGPT still possesses some limitations.

Currently, the most glaring issue is regarding information accuracy. The AI model can give a plausible-sounding but inaccurate answer to the user. This is because it is unable to check the information.

ChatGPT’s knowledge mostly comes from 2021 data. As OpenAI feeds information from 2022 into the model, it may produce false or outdated information for questions related to more recent topics.

Therefore, a user needs to fact-check answers from ChatGPT before they apply them to their project. Neglecting the human editing process for AI-generated website content can result in a bad brand reputation through the spread of misinformation.

The same goes for the technical aspect. When you make a website using AI, it’s best to test all the code it generates using services like Replit before adding it to your website.

replit homepage

Make sure to also double-check if ChatGPT gives you the same code you requested. Currently, the AI model tends to guess the user’s intention instead of asking a clarifying question for a vague query.


The significant advancement in artificial intelligence technology makes AI-powered website development possible today. ChatGPT can help create websites by generating necessary code snippets and giving various recommendations to speed up the development process.

The AI model is also accessible to everyone, making it a good option even for absolute beginners.

However, ChatGPT and other AI-powered tools, including AI website builders come with some limitations. For example, they can produce a false answer to your question or respond to harmful instructions.

Therefore, while using ChatGPT can help you save time, human editing is still essential in building websites with AI.

What's Your Reaction?