How to upgrade to the Latest Version of phpLD (currently 5.2.0)

Before you begin: Backup all files and the database. Download all files and database to your PC as a backup. You should be prepared to restore the backup in the case of a problem. If you don't feel you can do this with confidence, please request professional assistance. Also note that payment may be required if you need support doing the upgrade. If you prefer to bypass this work, and get it done by a professional, we offer upgrades starting at $50. Depending on the number of mods or template changes, it can cost more. Please realize this process is not always suitable for everyone, and it is recommended you seek professional assistance or at least be ready to pay for it if it is needed.

Preparations Steps:
(You will note the instructions specify multiple backups to insure you are "safe" throughout the process)

Backing up your database and creating a new database
1. Create a new database on your webserver (call it something like phpld520).
2. Make a dump of your current database, and import the entire contents into the new database, so this means you now have two identical databases!
3. Also, download a copy of your current database to your local PC. This means you now have 3 identical databases! Don't delete this. Keep it for several months.

Backing up your files and creating a new installation directory
Note: At no point during this part of the installation are you doing anything to change your current files or database. You are just working from copies.

1. Login via FTP to your webserver, and download a copy of your current site. Be sure you download all the files. It would be recommended you make a zip file of this, and save it on your local PC and keep it for many months.
2. Create a new folder on your webserver called /phpld520
3. Upload all the files you downloaded from step 1 to the new folder.
4. Login to your phpLD account and download the latest version of the software, and unpack it using your zip program.
5. Using your FTP program, upload all the files from the latest version to the new folder you created in steps 1 and 2.
6. In the new folder, Give write permission to following files and folders: "include/config.php", "temp", "temp/cache", "temp/adodb", "temp/templates", "sitemap.xml", "sitemap.xml.gz".
7. Using your browser, go to the new install directory of the new folder folder (ex. Click next and follow the instructions of the install process. Important Note: when you get to the page that asks for the database info, be sure you specify the new database you created in steps 1 and 2 of "Backing up your database and creating a new database" above. Click Continue after entering the information, At this point if you are upgrading from a previous 5.x version STOP
You will will have a couple more steps to follow from the admin.
If upgrading from any other version complete the installation steps until it says you are finished.
8. Having completed step 7, you now have upgraded the new database to the latest version, and all of your link, category and other data are still intact but upgraded. Congratulations! You know have a working database for the latest version.

For upgrades from a 5 version that is <=5.1.0 installation log into your admin
Go to database menu item and paste the following into the mysql field and run it:



For upgrades from a 5.1.5 installation log into your admin
Go to database menu item and paste the following into the mysql field and run it:\

now go the update database menu item in the admin and run it.
You are now updated.

Only admin core files are changed in this installation however if you have edited any of the admin core files you will need to add any custom edits back.

Testing your installation:
1. Use your browser to visit the new folder you created.
2. Surf through the site including detail pages, categories and submit pages.
3. Try submitting links and articles
4. Try submitting a payment (or ask a friend to do this for you).
5. Make sure everything is working to your satisfaction.
6. Set permissions for include/config.php to 400 or 444 (this sometimes can only be done through your control panel and does not work with your ftp program). Delete or move your install folder to keep it safe.

Backing up your old site and going live:
1. Create a new folder on your webserver to backup your existing installation. Name it something like /_phpld_previous (for security you may want to make the read/write/exec permissions 0)
2. Locate all files from your old directory site and move them to this folder so that you have a complete backup that you can revert to in the case of problems.
3. Move all the files from you new install to the root directory where you run phpLD.
4. Make a final check to make sure everything is running.
5. If everything was done correctly, you should now be running the latest version of phpLD. Congratulations!


For more support and information, please visit our forum:

Thank you for choosing PHP Link Directory!

Kind Regards,
the PHP Link Directory Team!