What are the best practices for creating a CMS without a login function, only with an admin area, using PHP?

When creating a CMS without a login function, it is important to restrict access to the admin area based on IP address or other secure methods to ensure only authorized users can access it. One way to achieve this is by checking the visitor's IP address against a list of approved IPs before allowing access to the admin area.

// Check if visitor's IP address is in the approved list
$approved_ips = array('192.168.1.1', '127.0.0.1');
$visitor_ip = $_SERVER['REMOTE_ADDR'];

if(in_array($visitor_ip, $approved_ips)){
    // Display admin area content here
} else {
    // Redirect unauthorized users to another page
    header('Location: unauthorized.php');
    exit();
}