Storeadmin area is slow

Usually when the storeadmin is slow, one of the following is true:

  1. There are so many items in the system that it takes forever to load the pages. This is only going to be the case on pages in which the items are displayed in a drop down box though. The fix is to set the 'Item Select' field in the 'Catalog Setup' area to 'No'. This keeps the system from using a drop down box for the products, which cuts back on the product load.

  2. There is an issue with mySQL on the server - either the server is using a very old mySQL version, there's some kind of corruption, or there are some other issues with the database. This is rather rare though. The fix is to have the host check the mySQL server or uncorrupt the database.

  3. There is an image or javascript in the header that's taking a long time to load. The fix is to temporarily remove the image or script; if the storeadmin speeds up, you know that's the issue.

  4. On versions UNDER 2.7, check the open.php page in the /includes/ folder in the /storeadmin/ area. Remove the last snip of code, between:

    // Delete backups if they exist

    and

    ?>

    and replace it with:

    if ($setpg == "backup" AND (!isset($_POST['submit']) OR $_POST['submit'] != "Backup Database"))
    {
    if (!empty($ftp_site))
    {
    $conn_id = @ftp_connect($ftp_site);
    $login_result = @ftp_login($conn_id, $ftp_user, $ftp_pass);
    }
    if ($dir = @opendir("files")) 
    {
    while (($file = readdir($dir)) !== false) 
    {
    if(substr($file, 0, 9) == "db_backup" OR substr($file, -4) == ".sql")
    {
    if (!empty($ftp_site))
    {
    $ftppagename = $ftp_path ."/" .$Adm_Dir ."/files/$file";
    $ftp_del_file = @ftp_delete($conn_id, $ftppagename) or die("Backup file exists. Please remove it.");
    }
    else
    @unlink ("files/$file") or die("Backup file exists. Please remove it.");
    }
    }
    closedir($dir);
    }
    if (!empty($conn_id))
    @ftp_close($conn_id);
    }

    This forces the backup file check and removal only on the backup page, which can help speed things up.

  5. The last issue is the most common reason for the slowdown. If you have FTP settings, and those settings are incorrect, the above delete sometimes hangs, causing the storeadmin to slow down. (A big culprit is a client who changes their control panel password, which is usually the FTP password as well.) The fix is to check the stconfig.php page (or config.php page in the /sbconf/ folder for version 2.62b) and make sure the FTP details are correct. An easy way to handle that is to create a separate FTP user just for the catalog, so that you won't get this error even if the client changes their cpanel password.