The database is not connected with Wordpress or PHP "directly", this should explain some things:
Summarizing PHP is the language that used together with Apache or Ngnix generates dynamic pages, Mysql is a totally separate server and PHP makes access to this server through a TCP request and uses the API to facilitate, ie you can access the database Wordpress without needing the Wordpress.
The only question is how will read the data, the database Wordpress is quite specific, the diagram of the bank is this:
Then just assemble the Selects as you wish, some details about the tables https://codex.wordpress.org/Database_Description
A very simple example of using the mysqli API to access the database on your mysql server:
<?php
$host = 'mysql.servidor.com'; //endereço do seu host
$user = 'usuario'; //usuario do banco do Wordpress
$pass = 'senha'; //senha do banco do Wordpress
$banco = 'banco_wordpress'; //nome do banco do Wordpress
//Conecta
$mysqli = new mysqli($host, $user, $pass, $banco);
if (mysqli_connect_errno()) {
printf("Erro de conexão: %s\n", mysqli_connect_error());
exit;
}
$query = 'SELECT * FROM wp_posts'; //Seleciona dados da tabela wp_posts (provavelmente contem seus imóveis)
if ($result = $mysqli->query($query)) {
//... pega os dados
$result->close();
}
$mysqli->close();
So if you don’t know yet the basics of using PHP recommend you start with the documentation, follow the links:
Depends kkk your question is not clear enough to generate a good answer.
– MarceloBoni
kkk, I’ll try to explain better, the site I developed is in php and the old site is Wordpress, so I wonder if it is possible to transfer the properties that are already registered on the old site to the current site
– Rogerio
exports the bank from the old site, and then imports it to the new site. See if this tutorial will help you https://mediatemple.net/community/products/dv/204403864/export-and-import-mysql-databases
– user60252
I’ll take a look, thanks
– Rogerio
wordpress is installed on your server or directly using https://br.wordpress.com/create/?
– Guilherme Nascimento