Automatic PHP Site Map

The live demo for the Automatic PHP Site Map can be found by clicking here.
You can purchase the Automatic PHP Site Map through ThemeForest by clicking here.

Installation Instructions:


1. Upload the file sitemap.php to your website (eg: www.mywebsite.com/sitemap.php).

2. Style the HTML header and footer so that this sitemap looks the same as the rest of your website.
This will be different for everyone depending on how the rest of your website is setup.
If you have a DreamWeaver template, you will need to apply your template to this page in DreamWeaver.
There are HTML comments in sitemap.php where you should place your header and footer html.

3. If you need to adjust which files are displayed, and which files are hidden, scroll down until you see the
big CONFIGURATION START label in the sitemap.php file. There are further instructions there.
Here are some examples of different configurations.

3a) To show all HTML, PHP, and JPEG files in your site map, do this:
$sitemap_include_files = array(
"/\.php$/i",
"/\.htm$/i",
"/\.html$/i",
"/\.jpe?g$/i",
);
3b) To hide all files that contain the word "test", "backup" or "copy" do this:
$sitemap_ignore_files = array(
"/test/i",
"/backup/i",
"/copy/i",
);

4. You can adjust the CSS style of the sitemap by editing the CSS styles in sitemap.php.
You can also cut and paste these styles into your site wide css file to keep everything in the one place.



Submitting your Automatic Site map to Google:

First create an account with Google Webmaster tools by clicking here.
Once you have your account, follow the prompts to submit your site map.
The site map xml URL will be http://www.yourwebsite.com/sitemap.php?xml


If you are familiar with mod_rewrite on Apache you can link sitemap.xml through to sitemap.php by doing something like this inside a .htaccess file

RewriteEngine on
RewriteRule ^/?sitemap.xml sitemap.php?xml

A lot of search engines will automatically look for sitemap.xml on your website automatically, so adding this redirect can help. You can of course always visit your site map xml url and "save as" sitemap.xml Demo xml link