- Help centre
- Getting started
- How do I connect a plain PHP site?
How do I connect a plain PHP site?
Short answerDownload the PHP connector, upload seomise-connector.php next to your pages and add one require line at the top of every page. Open your site over https and the file pairs itself.
The PHP connector is one file for sites that run PHP: hand-built PHP sites, CodeIgniter, Symfony, CakePHP and other PHP systems. Drupal and Joomla can use it too.
Steps
- Download it. In set-up choose Detect my platform (or pick your platform) and Download the PHP connector. Or open Settings → Site connector → PHP site → Download the PHP connector. The file carries a one-time code for your project, so there is nothing to paste.
- Upload it. Put
seomise-connector.phpnext to your pages, inside your public folder. - Include it. Add this line at the very top of every page, or once in a shared header file that every page loads:
<?php require __DIR__ . '/seomise-connector.php'; ?> - Open your site. Open any page over https. The file pairs itself straight after, within 48 hours of the download.
Already have the file? Open seomise-connector.php?seomise=/pair on your site, create a pairing code in Settings → Site connector and enter it there.
What it needs
- PHP 7.4 or newer, with the sodium extension.
- https.
- A private folder for its keys, outside your public folder. It finds one by itself; if it cannot, the pairing page says so and tells you to set
SEOMISE_PRIVATE_DIRin the file.
What it does
Once paired, it applies the changes you approve as each page is sent, so no page file is edited. Every change can be undone from SEOmise. It also adds the visitor tracker. See "What can the site connector change, and what can't it?" for the full list.
Pages served without PHP, such as plain .html files, are not changed.
Settings in the file
SEOMISE_SCOPESlists what SEOmise may change. Take one out to refuse it.- The file updates itself when PHP may replace it. Set
SEOMISE_AUTO_UPDATEtofalseto stop that; new versions then appear on the Site connector page to download.
Not what you needed? Ask Mise or contact support.
Still stuck?
Ask Mise, or a person
Mise answers from these help articles in seconds. If the answer is not here, raise a ticket and our support team replies by e-mail.