I have a WordPress (WP) site hosted at OVH, Pro subscription, rehve.fr, on which I'm experiencing a large number of denied requests that cause visitors to be redirected to the WP installation page instead of a standard “access denied” page. I have opened several tickets with OVH and carried out detailed follow‑ups on the WP forums, without any conclusive result at this point.
Several years ago I created a sub‑domain nous.rehve.fr. I imagine it could be one of the origins of my problem. I want to detach it from the main site to make it an independent site. I see plenty of tutorials and advice on creating a sub‑domain, but none on deleting a sub‑domain.
The main difficulty seems to be that the database is shared between the two sites. The table prefix of the main site is 'wp_', while the sub‑site uses 'wpNous_'.
To make it an independent site, I imagine opening a new hosting account at OVH, installing a fresh WP, uploading the files from nous.rehve.fr, but how do I split the database between the 'wp_' tables that are no longer needed for the new site and the 'wpNous_' tables that belong to it?
Finally, once the new site is operational, how should I delete the sub‑domain that I no longer need on the original site?
I’m going to create a domain/hosting on OVH to transfer the WP sub‑site from my current hosting. Your tutorials will be very useful to me, as my previous installations were done several years ago and I’ve somewhat forgotten the procedure.
However, after a quick review of these documents I don’t see my specific case where I only want to reinstall the database tables prefixed “wpNous_”. How do I separate them from the other (much larger) tables prefixed “wp_”?
I hope I have phrased my question more or less clearly; sorry if it isn’t the case
In fact, with the PRO hosting I already have, I can create a second site on the same hosting and a second independent database to host the tables prefixed 'wpNous_'.
Does that change anything regarding my question? Thanks.
After sustained work with Gaston (and OVH support), we were able to resolve, at least for now, the issue of denied requests on 'rehve.fr' that was sending visitors to the WordPress installation page in 5 minutes instead of the site’s home page.
1. Blocking IPs coming from China, Hong Kong and Russia with the following code added to .htaccess (recommendation from OVH support)
# Block access from IPs coming from China and Russia
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE HK BlockCountry
Deny from env=BlockCountry
IP blocking
90 % of the denied requests originated from China and I don’t think I have many Chinese readers…
2. Freeze IPs for 10 minutes that send more than 60 requests in 60 seconds with the following code in ‘index.php’ (recommendation from the OVH forum, code generated by AI Copilot):
// --- CONFIG ---
$rateLimitMaxRequests = 60; // max requests per IP
$rateLimitWindowSeconds = 60; // window in seconds
$banDurationSeconds = 600; // ban duration (10 min)
$storageDir = __DIR__ . '/rate_limit_storage';
// Create storage folder if needed
if (!is_dir($storageDir)) {
mkdir($storageDir, 0755, true);
}
$ip = $_SERVER['REMOTE_ADDR'] ?? 'unknown';
$now = time();
$ipFile = $storageDir . '/ip_' . md5($ip) . '.json';
// Load state for this IP
$data = [
'requests' => [],
'banned_until' => 0,
];
if (file_exists($ipFile)) {
$json = file_get_contents($ipFile);
$tmp = json_decode($json, true);
if (is_array($tmp)) {
$data = array_merge($data, $tmp);
}
}
// Check if IP is banned
if ($data['banned_until'] > $now) {
http_response_code(429);
header('Retry-After: ' . ($data['banned_until'] - $now));
exit('Too many requests. Your IP is temporarily blocked.');
}
// Clean up requests that are too old
$windowStart = $now - $rateLimitWindowSeconds;
$data['requests'] = array_filter(
$data['requests'],
function ($ts) use ($windowStart) {
return $ts >= $windowStart;
}
);
// Add the current request
$data['requests'][] = $now;
// Check the number of requests in the window
if (count($data['requests']) > $rateLimitMaxRequests) {
// Temporary ban
$data['banned_until'] = $now + $banDurationSeconds;
file_put_contents($ipFile, json_encode($data));
http_response_code(429);
header('Retry-After: ' . $banDurationSeconds);
exit('Too many requests. Your IP is temporarily blocked.');
}
// Save state
file_put_contents($ipFile, json_encode($data));
// --- Rest of the normal script (WordPress, app, etc.) ---
This works and I haven’t had any denied requests for a week. So for now it doesn’t seem necessary to separate the sub‑site from the main site.