How to clear the cache in Magento?

How to clear the cache in Magento? If you have made any modifications to your Magento store, they will not appear immediately unless you clear the cache. Magento keeps its cache in /var/cache located inside the Magento installation directory. So, for example, if your Magento is installed in your main public_html folder, the cache will be in public_html/var/cache. To clear the cache, simply delete everything from the /var/cache directory and then reload your website in your browser. To clear all sessions, you can also delete everything from the /var/session folder within your Magento installation directory.

How to Setup SSL in Magento

A private SSL certificate is an important upgrade to your website. The basic function of an SSL is to encrypt all communication between the browser and the server, ensuring that all data goes through a secure (HTTPS) connection. An SSL certificate is a necessity when you want to operate an online shop and process the sensitive customers data through your software. It helps you gain your clients' trust and increase your web site's search engines rank. You can purchase a private SSL from Parent Technology. The certificate could be easily enabled through the Magento Admin area -> System -> Configuration -> Web. There you can define the insecure (non-SSL) and secure (SSL) URLs:   In the Base URL fields you should enter the unsecure (regular) web site URL and the web site URL for the SSL connections. You can leave the other values unchanged, as they will be set automatically by the script after you enter the Base URL. Basically the other fields define the URLs of the main Magento store page and the URLs of the skin, media and JavaScript folders. The drop-down menus allow you to enable and disable the SSL support for the web site's frontend and backend. Bear in mind that the SSL connection over HTTPS is slower than the HTTP, thus secured connection should be applied only to the pages that contain and process sensitive information. Also, it is recommended to run the admin interface through an SSL. In this way you will increase the security of the script's backend.

How to set up log cleaning in Magento

How to set up log cleaning in Magento using Magentos Default Log Cleaning or use a custom script Parent Technology uses both for its customers.   It all depends on the customers hosting plan. In order to make sure that your Magento is not being slowed down by a huge amount of old log records, it is recommended that you set up its log cleaning function to automatically purge old logs. You can do this from the Magento admin area > System > Configuration > Advanced section > System > Log Cleaning. Once there, modify the value for Save Log, Days. The default value is 180 but we recommend changing it to 60 or even 30 days. Then set Enable Log Cleaning to Yes and click Save Config to save the changes. Note that the Log Cleaning functionality depends on the Magento cron. You need to make sure you have set up the cron in order for your log cleaning to work properly.   I also found another great script to clean Magento ----------------------------- Create a file called cleanup.php and add the following code to it: -----------------------------
  1. <?php
  2. $xml = simplexml_load_file('./app/etc/local.xml', NULL, LIBXML_NOCDATA);
  3. $db['host'] = $xml->global->resources->default_setup->connection->host;
  4. $db['name'] = $xml->global->resources->default_setup->connection->dbname;
  5. $db['user'] = $xml->global->resources->default_setup->connection->username;
  6. $db['pass'] = $xml->global->resources->default_setup->connection->password;
  7. $db['pref'] = $xml->global->resources->db->table_prefix;
  8. if($_GET['clean'] == 'log') clean_log_tables();
  9. if($_GET['clean'] == 'var') clean_var_directory();
  10. function clean_log_tables() {
  11.     global $db;
  12.     $tables = array(
  13.         'dataflow_batch_export',
  14.         'dataflow_batch_import',
  15.         'log_customer',
  16.         'log_quote',
  17.         'log_summary',
  18.         'log_summary_type',
  19.         'log_url',
  20.         'log_url_info',
  21.         'log_visitor',
  22.         'log_visitor_info',
  23.         'log_visitor_online',
  24.         'report_event'
  25.     );
  26.     mysql_connect($db['host'], $db['user'], $db['pass']) or die(mysql_error());
  27.     mysql_select_db($db['name']) or die(mysql_error());
  28.     foreach($tables as $v => $k) {
  29.         mysql_query('TRUNCATE `'.$db['pref'].$k.'`') or die(mysql_error());
  30.     }
  31. }
  32. function clean_var_directory() {
  33.     $dirs = array(
  34.         'downloader/pearlib/cache/*',
  35.         'downloader/pearlib/download/*',
  36.         'var/cache/',
  37.         'var/log/',
  38.         'var/report/',
  39.         'var/session/',
  40.         'var/tmp/'
  41.     );
  42.     foreach($dirs as $v => $k) {
  43.         exec('rm -rf '.$k);
  44.     }
  45. }
  46. ?>
Save the file to the directory where Magento resides. Next, open up cPanel and click on the Cron Jobs icon. Click on the Standard button. For the Command to run, enter the following line of code, making sure to replace the domain name with your own:
curl -s -o /dev/null http://www.domain.com/cleanup.php?clean=log
I would recommend leaving the time settings as is, so your log tables will be cleared out daily at 3 AM. Once you have this set at your preferred interval, click the Save Crontab button. If you want to have your var directory cleared out automatically, add the following line of code to a new entry:
curl -s -o /dev/null http://www.domain.com/cleanup.php?clean=var
It would be best to clean this out every 2-4 weeks, so set the Day(s) column to 14 or 30. Click the Save Crontab button once you’re done. This script may not work in all hosting environments, and I take no responsibility if you fubar your site up!

Facebook Products Tab - Magento Extension

Key features of “Facebook Products Tab” Magento extension: - Show your Magento products in Facebook for free; - No monthly fees; - 100% open source code; - Your own Facebook application and you are the only application owner and administrator; - 100% customizable design based on Magento template engine. Contact us to integrate this feature into your Facebook corporate page!

Site Search

Contact Us

 
 
 
Parent Technology Inc.
1535 Rosalind Rd Se
East Grand Rapids, MI 49506, USA
 
 

This email address is being protected from spambots. You need JavaScript enabled to view it.