Author: james

Recursively download entire website all files

To download all files on a website using ‘wget’ use: wget -r -nH –cut-dirs=1 –no-parent -e robots=off pawie.amiciscemi.org/temp/ -r = recursive -nH =–no-host-directories – remove www.site.com from saved folder–cut-dirs=1 = remove /folder from saved folder–no-parent = do not go above

read more

Quickly get copyable list of links from Google about a site

Type into Google:  link:https://www.startnet.co.uk this will list all the links from startnet.co.uk Save the page as “page.html” edit and paste this at the end, then redisplay in your web browser. <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script> <script>$(‘span.st,.s’).remove();$(‘h3’).css(‘overflow’,’visible’);$(‘h3 a’).each(function(e) {var t=$(this).attr(‘href’);$(this).text(t);});</script> Done

Mysql Database and table sizes in Mb

Actual database size: SELECT table_schema “Data Base Name”, SUM( data_length + index_length) / 1024 / 1024 “Data Base Size in MB” FROM information_schema.TABLES GROUP BY table_schema ; +——————–+———————-+| information_schema |           0.00390625 | | startnetdb         |          38.96961117 | +——————–+———————-+ Table sizes:

read more

Migrate a Magento installation to another server

Copy all the files. Copy the database. Restore .htaccess file. Edit app/etc/local.xml Change the database details UPDATE the core_config_data table – Fix the base directory select * from core_config_data where path like “%base%”; update core_config_data set value=”http://www.domain.com/” where config_id=X or

read more

Truncate and clear logs in Magento

Run the following in MYSQL to reduce your Magento database, by possibly hundreds of megabytes. It clears the logs. truncate log_customer; truncate log_quote; truncate log_summary; truncate log_summary_type; truncate log_url; truncate log_url_info; truncate log_visitor; truncate log_visitor_info; truncate report_event; truncate report_viewed_product_index; truncate

read more

Fixing openbasedir PHP error in Plesk 10

Kept getting log errors : error_log:[Tue Mar 20 13:42:39 2012] [warn] [client 217.40.150.250] mod_fcgid: stderr: PHP Warning:  file_exists() [<a href=’function.file-exists’>function.file-exists</a>]: open_basedir restriction in effect. File(XXX) is not within the allowed path(s): (VHOST DIRECTORY:/tmp/) in FILEXXX on line 334…. To fix

read more