How to install PHP & MySQL scripts
Ranked #3,973 in Internet, #218,738 overall
How to install scripts?
What's your favourite script?
Which do you use, like or maybe even love?
Installing scripts in general
The basic steps to install a PHP/MySQL script.
Most of these scripts consist of a system ( e.g. programmed in PHP ) and a database ( interacted with using MySQL ). To install such script, a few common steps can be walked through. First, after having downloaded and extracted your script (right-click the file, then select "extract all", if you do not have any software to extract zip-files with: consider winrar or winzip) , you'll need to make sure you have the following stuff checked:
- Check whether there's an automated install file for the script ( e.g. install.php or install/install.php ). If this is the case, you'll only need to do step 1 & step 2 and run the install.php file of your script, in the browser right away!
- Find out whether there's a SQL file ( e.g. database.sql ) which contains the database for the script (if any).
- Find the configuration file for the MySQL setup for the script ( e.g. config.php ).
- Upload the script.
If you're running a webserver on your own PC at home ( e.g. using XAMPP ) you can just put it in your public directory ( e.g. C:/xampp/htdocs ) and run the webserver. Otherwise you'll need to upload it to your webhost. To do this you need your FTP info ( get it from your webhost ) and you'll need a FTP software, e.g. FileZilla FTP. Run the FTP software, fill in your FTP info from your webhost account and connect to your website's public directory ( e.g. htdocs or www ). Next: drag the files from your pc ( the extracted script ) to the public folder in FileZilla to upload it to that directory. - Create the MySQL Database & Database User.
If your script requires a MySQL database, create it. Otherwise continue to step 5. To do so you can access your webhost's admin panel ( e.g. cPanel is a common used one ). To do so you need the url to access it and your login info from your webhost. You can then go to MySQL Databases > Create Database and create a database with any name you like. Now create a database user: Databases > Create User and set a username and password for the user, create it and assign it to your database.
- Import the SQL.
Access your just created database by ( for example ) going to phpmyadmin from your webhost's admin panel. If your webhost uses any other database management software than phpmyadmin, that's no problem but as phpmyadmin is the most common one, we'll assume we're using that software here. When you've opened phpmyadmin, go to Import SQL and select the SQL file ( e.g. database.sql ) that you found with your script. - Update the config file.
We'll now need to update the config of the script for the MySQL database configuration. Open the file you've found to be the config file for the MySQL connection ( e.g. database.php or config.php ) with notepad. Now find the variables containing the info ( e.g. $database_name = "database name here" ) and enter the correct value inbetween of the quotes ( according to your MySQL info and database name ). An example of a config file:
config.php
<?php
Some scripts may use definements instead of variables, then it may look like this:
$config['Database']['dbname'] = 'your_database_name_here';
[...]
$config['MasterServer']['servername'] = 'server_name_here';
[...]
$config['MasterServer']['username'] = 'db_user_name_here';
$config['MasterServer']['password'] = 'db_user_pass_here';
wp-config.php
define('DB_NAME', 'your_database_name_here');
/** MySQL database username */
define('DB_USER', 'db_user_name_here');
/** MySQL database password */
define('DB_PASSWORD', 'db_user_pass_here');
/** MySQL hostname */
define('DB_HOST', 'db_host_name_here');
- Enjoy your newly installed script!
How to install Wordpress
- Download wordpress.
- Extract the files (unzip) in one map.
- Upload the script.
- Create the MySQL Database & Database User.
- Update the config file & continue to step 6 OR continue to step 6 already and create it through the wordpress installation.
wp-config-sample.php -> rename to -> wp-config.php
(open with notepad to edit)
define('DB_NAME', 'your_database_name_here');
OR:
/** MySQL database username */
define('DB_USER', 'db_user_name_here');
/** MySQL database password */
define('DB_PASSWORD', 'db_user_pass_here');
/** MySQL hostname */
define('DB_HOST', 'db_host_name_here');

Fill it in through the installation ( next step, preview shown above ).
- Install the script
by running it in your web browser ( e.g. http://localhost/path/to/wordpress/ or http://yourwebsite.com/path/to/wordpress )


- Enjoy your newly installed script!
How to install phpBB3
- Download phpBB3.
- Extract the files (unzip) in one map.
- Upload the script.
- Create the MySQL Database & Database User.
- Run the installation through your webbrowser.
E.g. go to http://yourwebsite.com/path/to/phpBB3 or http://localhost/path/to/phpBB3. Preview shown below.


- Enjoy your newly installed script!
You might also like ...
Comments & Questions
-
-
Jimformation
Aug 9, 2011 @ 9:31 am | delete
- Very handy. And a good reference. Thanks!
-
-
-
webcodez
Aug 18, 2011 @ 7:16 am | delete
- I'm glad you liked it! :)
-
by webcodez
"Give a man a program and you'll frustrate him for one day. Teach a man to program and you'll frustrate him for a whole lifetime."
webcodez
GameHeroes
more »
- 21 featured lenses
- Winner of 14 trophies!
- Top lens » PHP & MySQL Poll System Tutorial
Explore related pages
- PHP basics tutorial PHP basics tutorial
- MySQL Basics Tutorial MySQL Basics Tutorial
- HTML Basics Tutorial HTML Basics Tutorial
- PHP & MySQL Poll System Tutorial PHP & MySQL Poll System Tutorial
- PHP & MySQL Login System Tutorial PHP & MySQL Login System Tutorial
- PHP & MySQL Visitors Counter Tutorial PHP & MySQL Visitors Counter Tutorial