Installing PHP-Nuke manually is a little bit harder than the Fantastico Auto-Installer procedure. It involves downloading the source tarball, configuring the application and importing a mySQL database. For the purpose of this tutorial, we will be using www.s-tutorials.com as a domain name and manual/ sub-directory for the main directory the script will reside in, which results in
http://www.s-tutorials.com/manual
as a final URL for our manual installation of the PHP-Nuke application.
First, let us prepare your account for the installation. We will need a directory where PHP-Nuke files will be uploaded to and a database, where it will store its data. To create a directory, please login to your CPanel control panel and click on the FileManager utility icon. This will open a new window with a list of several files and folders. Click on the 'www' icon to change your current location (Please, note that you have to click on the icon and not on the text, otherwise FileManager will not change the current working directory, but instead will list you the operations you can perform on the 'www' folder).
Once inside the www folder, you will have to create the directory where the files will be uploaded to.
Please, click on 'Create New Folder' link and enter the new folder name in the empty field. In this case, the directory name is 'manual', but you can set it to anything (for example 'portal' or ‘php-nuke’). Click on 'Create' button and the new folder will appear in the list at the left.
NB: If you would like to manually install phpNuke in the main directory of your website (and not in a subfolder), all you need to do is to upload phpNuke files in the ‘public_html’ folder of your website.
Now, let us create the database for phpNuke. Please, go back to your CPanel home (simply close the FileManager window) and click on the 'MySQL Databases' tab. Scroll down a little bit and locate the ‘New Database’ form. Enter the name for your new database (nuke for example) in the DB: field and click on 'Add Db' button. This will create a new database in your account. The tricky part here is that CPanel is configured to auto-append your username in front of the database name. For example: ‘username_nuke’
In our case, the username which I am using to login to CPanel is 'stutorials' and the database name I chose was 'nuke', so when I clicked on 'Add DB' the actual database that was created is: 'stutorials_nuke'
After you have added the new database (a confirmation page will appear with 'Database Created' message), you will need to create a new username for that database. To do so, 'Go Back' and right below the 'Add DB' button, there is the 'Users' creation form. Fill in the desired username and password.
Generally, it is a good idea to have both the database and the user created with one and the same name, but again you can set it to anything. The same CPanel rule applies here too - if you have added nuke as username, the actual username will be 'stutorials_nuke' in my case (and username_nuke in yours, where username is your actual CPanel username).
Having added both the database and the username, the only thing that left to be done with the database is to grant permissions to the username for the newly created database. This can be easily done using the permissions form on the very same page, which is above the 'Add DB' button. From the first drop-down menu select the newly created username, from the second drop-down menu select the database and then just click on 'Add User to DB' button. Here you go! You have successfully added a database and configured a username to use it.
Your account is now ready for the PHP-Nuke installation. We should now obtain the script files and upload them to your account. PHP-Nuke official web site is located at http://www.phpnuke.org and we are going to download the latest PHP-Nuke release from there*. Here is a direct link to the latest source tarball:
http://www.phpnuke.org/modules.php?name=Downloads&d_op=viewdownload&cid=1
Visit the page and download the latest zip file containing the phpNuke files. Once downloaded, please unzip it using any archive program (such as WinZip or WinRar) somewhere on your computer. This will create 3 different directories: ‘html’, ‘sql’ and ‘upgrades’. The phpNuke files reside under the ‘html’ directory, but before uploading them we will need to change the database configuration values in the ‘config.php’ file. To do so, please open the ‘config.php’ file inside the ‘html’ directory using your favorite text editor (I recommend the use NotePad) and locate the following 4 lines:
$dbhost = "localhost";
$dbuname = "root";
$dbpass = "";
$dbname = "nuke";
We should change them to reflect your newly created database and username. Change the words between the quotations with the right values. In my case, it looks like:
$dbhost = "localhost";
$dbuname = "stutorials_nuke";
$dbpass = "MyPassword";
$dbname = "stutorials_nuke";
After you have modified the ‘config.php’ file and added the correct values, please save the file in the same ‘html’ directory and overwrite the previous one.
Now we should upload the PHP-Nuke files. This can be easily done using any FTP client program.
Connect to your FTP account and navigate to ‘www/manual’. Then select all files from the ‘html’ directory from the PHP-Nuke installation files and upload them to your web hosting account. Depending on your connection speed, the process may take up to 10 minutes to complete.
Meanwhile, we will populate the database we have created earlier. Please, open CPanel -> 'MySQL databases' and scroll down to the end of the page. You will see a link to 'phpMyAdmin' tool. Click on it and a new page will load. Please, select the database you have created (stutorials_nuke in my case) from the drop-down menu at the left-hand side, and wait for the right side of the screen to update. Once fully loaded, click on 'SQL' tab and then on 'Browse' button. This will open a file upload browser window. Please, navigate to the sql/ directory, which come with the phpNuke archive file and which we have previously extracted on your local computer. There should be only one file inside that directory called nuke.sql. Double click on it and then click on the 'Go' button. The process might take up to several minutes to complete and at the end you should see 'Your SQL query has been executed successfully' confirming that the procedure was completed successfully.
To finalize the installation and create the administrative user, please go to your admin.php page. In my case this is http://www.s-tutorial.com/manual/admin.php. You will be then asked for your full name, e-mail address, desired username and password. Fill in the form and submit it... and that is it !! You have successfully installed PHP-Nuke on your account.
* Please, note that as of February 2006, latest official releases of PHP-Nuke would cost a one time fee of $10. Learn more