# GIS Dictionary Deployment Checklist

Repository: https://github.com/sohailgoheer/GISdictionary.git

Local development path:

```text
C:\xampp\htdocs\ws\tools\gis\GeoWordBank
```

Final live URL:

```text
https://gisittools.com/tools/gis/GISdictionary/
```

Final cPanel hosting path:

```text
public_html/tools/gis/GISdictionary/
```

The local folder can stay named `GeoWordBank`. The public hosting folder should be `GISdictionary`.

## 1. Files And Folders To Upload

Upload these files and folders:

```text
.htaccess
DEPLOYMENT.md
index.php
a-z.php
term.php
search.php
queries.sql
structure.txt
assets/
db/
img/
includes/
```

Do not upload local or temporary files:

```text
.git/
.idea/
desktop-qa.png
mobile-qa.png
*.log
.env
cache/
tmp/
temp/
screenshots/
node_modules/
vendor/
*.zip
```

## 2. URL Configuration

The canonical/base URL is configured in:

```text
includes/layout.php
```

Expected value:

```php
const GD_BASE_URL = 'https://gisittools.com/tools/gis/GISdictionary/';
```

This makes term canonical URLs resolve like:

```text
https://gisittools.com/tools/gis/GISdictionary/citygml-dataset.html
```

## 3. Database Configuration

Update the production database settings in:

```text
includes/db.php
```

Example:

```php
$host = 'localhost';
$port = 5432;
$dbname = 'your_database_name';
$user = 'your_database_user';
$pass = 'your_database_password';
```

Confirm the hosting account supports:

- PostgreSQL
- PHP PDO
- `pdo_pgsql`
- PostgreSQL features used by search, including `ILIKE` and similarity search if enabled in the SQL setup

## 4. Import Database

If the production database is empty, import:

```text
queries.sql
```

If needed, also import SQL files from:

```text
db/
```

Confirm the main table exists after import:

```text
gis_terms
```

## 5. Verify `.htaccess` Slug Routes

Upload `.htaccess` to:

```text
public_html/tools/gis/GISdictionary/.htaccess
```

Expected rule:

```apache
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)\.html$ term.php?slug=$1 [L,QSA]
```

Expected route:

```text
https://gisittools.com/tools/gis/GISdictionary/citygml-dataset.html
```

Internally loads:

```text
term.php?slug=citygml-dataset
```

If `.html` term URLs return Apache 404 errors, check that Apache rewrite is enabled and that `.htaccess` overrides are allowed.

## 6. Post-Deployment Test URLs

Open these URLs after upload:

```text
https://gisittools.com/tools/gis/GISdictionary/
https://gisittools.com/tools/gis/GISdictionary/a-z.php
https://gisittools.com/tools/gis/GISdictionary/citygml-dataset.html
https://gisittools.com/tools/gis/GISdictionary/abandoned-infrastructure.html
https://gisittools.com/tools/gis/GISdictionary/not-a-real-term.html
https://gisittools.com/tools/gis/GISdictionary/search.php?all=1&page=1&limit=10
```

Expected results:

- Index page loads with search, category filter, A-Z buttons, and results table.
- A-Z page loads and letter navigation works.
- Term pages load with compact title cards.
- Invalid slug shows the clean `Term not found` page with HTTP 404, not PHP warnings.
- `search.php` returns JSON with `data`, `total`, `page`, and `mode`.

## 7. SEO Source Checks

Inspect the live page source for index, A-Z, and term pages.

Confirm each page has:

- Exactly one `<title>`
- Exactly one `<meta name="description">`
- One canonical URL using `https://gisittools.com/tools/gis/GISdictionary/`
- Open Graph tags
- Twitter card tags
- Valid JSON-LD
- One H1 only
- No `localhost` URLs in public SEO tags
- No old `GeoWordBank` public branding
- No legacy dictionary brand text

Expected term canonical format:

```text
https://gisittools.com/tools/gis/GISdictionary/[slug].html
```

Expected example:

```text
https://gisittools.com/tools/gis/GISdictionary/citygml-dataset.html
```

## 8. Link And Asset Checks

Confirm these work after deployment:

- Header GISITTools brand link goes to `https://gisittools.com/`
- Back to Dictionary buttons return to `index.php`
- Back to Main Page buttons open `https://gisittools.com/`
- Tools dropdown opens and shows `Tool 1` and `Tool 2`
- CSS loads from `assets/css/style.css`
- Logo loads from `img/logo.png`
- Term links resolve to `[slug].html`

## 9. Common Shared Hosting Issues

`500 Internal Server Error`

- Check cPanel error logs.
- Temporarily test without `.htaccess`.
- Confirm PHP version and required extensions.

`.html` term URLs show Apache 404

- Confirm `.htaccess` was uploaded.
- Confirm Apache `mod_rewrite` is enabled.
- Confirm overrides are allowed for this folder.

`search.php` returns a database error

- Check `includes/db.php` credentials.
- Confirm PostgreSQL access from PHP.
- Confirm the `gis_terms` table exists.

`could not find driver`

- Enable `pdo_pgsql` in hosting PHP extensions.

Search similarity errors

- Import the full SQL setup.
- Enable PostgreSQL `pg_trgm` extension if the SQL requires it.

Styles or logo missing

- Confirm `assets/css/style.css` and `img/logo.png` uploaded under `public_html/tools/gis/GISdictionary/`.

Wrong canonical or OG URL

- Confirm `GD_BASE_URL` in `includes/layout.php` is exactly:

```text
https://gisittools.com/tools/gis/GISdictionary/
```
