Create an Onpub Website

In order to create your first Onpub-powered website, you must first make sure Onpub is installed and functioning correctly. To verify this, login to Onpub and make sure no errors displayed on the Welcome page and that "All tables are installed." is displayed under the Database Tables heading. If this is what you see, you are ready to start creating websites with Onpub.

In order to create a website in Onpub, follow the steps below.

  1. Place your mouse pointer over the New drop-down menu and select Website
  2. On the New Website page that comes up, enter the name of your website in to the Name field and click the Save button to continue

Once you click the Save button, your new website has been saved to the Onpub database. You are now ready to start creating Articles and Sections within your new site.

Now that you have an Onpub-managed website, the next step is to configure the included frontend layout so that others can view your content without logging in to the Onpub management interface. Follow the steps below to make your site content published and viewable with the included frontend layout.

Perform the following steps in your Onpub install directory:

  1. Create a blank file called: onpub_conf_local.php
  2. Open the onpub_conf_local.php file in your favorite text editor and paste in the following code:
<?php

$onpub_db_host = 'localhost';
$onpub_db_name = 'onpub';
$onpub_db_user = 'username';
$onpub_db_pass = 'password';

?>

The above configuration variables tell Onpub how to connect to your MySQL database. Replace the values of the above variables with your real connection details. For example, replace 'username' and 'password' with your actual MySQL account username and password.

This is the minimum frontend configuration required to output the contents of an Onpub-managed website using the included default layout.

Now, point your browser to http://localhost/onpub/index.php (replace localhost with the actual domain and/or IP address of your Onpub installation directory) and you will see your Onpub-managed content rendered in an easy to navigate, standard website layout. You have now published your first Onpub-managed website! Now you are ready to start creating more Articles and Sections to share with your site's readers. As you publish more content via the Onpub management interface it instantly shows up on your site's frontend, allowing you to edit your site in real time.