Advanced tricks

Can I run Nucleus offline from my local computer/hard drive without being online?

Written and contributed by Leng Lui.

Scenario:
"I want to be able to run Nucleus from my own computer so I can work on my skin designs and see how they look without having to be online."

Solution:
You will need to set up a local server with php and MySQL. But don't worry, it's all very easy to do.

Original forum thread:
http://forum.nucleuscms.org/viewtopic.php?t=14180

Method:

  • Download and install XAMPP in order to set up a local server to run Nucleus from. For Windows users, you have a choice between an installer package (Windows, 33 MB), a zip package (Windows, 86MB) and a self-extracting archive (Windows, 28MB). It is recommended you use the self-extracting archive, as it is quick and easy to download and set up.

    Download and install XAMPP

    If you don't use Windows, don't worry. There are also builds for Linux, Mac OS X and Solaris.

  • When you have finished downloading, follow these instructions to install if you chose the installer package, otherwise follow these instructions to install XAMPP.
  • Navigate to where you have installed XAMPP. In our example, we have installed into C:\Program Files\xampp\. Find the file xampp-control.exe and run the program.

    Run the "xampp-control.exe" program.

  • You should now see a screen listing some modules such as "Apache" and "MySQL". Click on the button labelled "Start" next to those two modules to run them.

    Click "Start" to run "Apache" and "MySQL" modules.

    When both Apache and MySQL are up and running, you should see a screen like this:

    The text "Running" highlighted in green next to the Apache and MySQL modules means they are both running.

  • Next, go to the official Nucleus CMS website and download the latest version of Nucleus CMS.

    Download the latest version of Nucleus CMS

  • After this, you can install Nucleus as normal. The next few steps will focus on the things different from installing Nucleus on a web host server.
  • Make sure you extract the Nucleus files INSIDE the \xampp\htdocs\ folder, otherwise your web browser won't be able to find your offline Nucleus installation.

    Ensure you install Nucleus inside the htdocs directory

  • Open your web browser and navigate to http://localhost/. Select your language and you will now see the XAMPP welcome page. Click on the phpMyAdmin link in the left hand menu to create and set up your Nucleus MySQL database.

    The XAMPP welcome page

  • Under the section labelled "Create new database", type in the name of your database and click on "Create". In our example, we will call the new database nucleus.

    Create your Nucleus MySQL database

  • In your web browser, navigate to http://localhost/path/to/nucleus/install.php to start the Nucleus installation process. In our example, we have installed Nucleus in a subdirectory called nucleus3.24, so we navigate to http://localhost/nucleus3.24/install.php.

    Navigate to install.php in your web browser.

  • For your database settings, enter hostname as localhost and the name of your database. In our example, the name of the database is nucleus. You can put the username as root and leave the password field blank.

    Enter your database settings

    WARNING: The username root is the default Apache user. If you are planning to make your local installation of Nucleus available online, it is strongly recommended for security reasons for you to disable the root user, set up a new user with a strong password and give that user access to your Nucleus database instead.

  • Check to see all your paths are correct. They should either all have a base path of http://localhost/path/to/nucleus/ or your normal Windows file path, e.g. C:/Program Files/xampp/htdocs/. In our example, the correct base paths are http://localhost/nucleus3.24/ and C:/Program Files/xampp/htdocs/nucleus3.24/.

    Check your path settings are correct.

  • Almost there now! If you have successfully installed Nucleus, you should get this screen:

    Installation successful screen

  • The very last step is to delete install.php and install.sql:

    Delete install.php and install.sql

    and change permissions on config.php. You can do this simply by right-clicking, select the "Properties" menu and make sure the "Read-only" and "Archive" boxes are checked:

    Change permissions on config.php

  • That's it! You have now installed Nucleus locally on your computer and can use it offline. Happy Nucleusing!*

* Just be warned you will not be able to directly import a backup of your online blog as the paths will not be set correctly. Importing the contents of your online blog offline will be covered in a later FAQ.

section: Advanced tricks | submitted by Leng on 2006.Nov.18 | 5770 views

item rate
Total votes: 9 - Rating: 9.67

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10