CSV file generation failing

Try this: <?php header(“Content-type: application/csv”); header(‘Content-Disposition: inline; filename=”export.csv”‘); // change this filename include (‘../../../wp-load.php’); // may need to change number of “../” depending upon location global $wpdb; $rows = $wpdb->get_results (“SELECT * FROM {$wpdb->prefix}table_name”); // change the table name echo strtolower(implode(‘,’, array_keys((array)$rows[0]))) . “\r\n”; // fixes an Excel bug if the first column is “ID” … Read more

Any way to check the integrity of a WordPress site?

WordPress is pretty solid, usually misconfigurations get in the way. You want to make sure: you have your wp-config.php file properly set your database is accessible that your home and siteurl settings are properly set in wp_options table sometimes a plugin fouls things up, you can disable all plugins by unsetting active_plugins in the wp_options … Read more

Out of Memory when Uploading an Image

This isn’t a WordPress problem. There’s no telling on a shared environment what the culprit might be. You probably don’t have access to your php.ini config, nor do we know how many websites your hosting company has jammed on your server. The very nature of a shared server is that each client shares the resources … Read more

update user information

You’re not closing the first if tag. /* Update user information. */ if ( !empty( $_POST[‘url’] ) ){ update_user_meta( $current_user->id, ‘user_url’, esc_url( $_POST[‘url’] ) ); } else{ delete_user_meta( $current_user->id, ‘user_url’); } Also, you should use esc_url_raw on a raw url and then if you’re echoing into the html use esc_url. You also shouldn’t save esc_attr … Read more