Problem: Create a cron job to export posts to a WordPress XML file on server

Your problem is that ob_file ain’t global. You only define it in c3m_export_xml(). Setting global $ob_file in ob_file_callback() gives you an empty file handle. Try this instead: function c3m_export_xml() { $args=array( ‘content’ => ‘posts’, ‘start_date’ => ‘october 2008’, ‘status’ => ‘published’); ob_start(); export_wp($args); $xml = ob_get_clean(); file_put_contents(‘server_path_to_my_file.xml’, $xml); }

What is a better way to backup files than FTP?

(assuming that FTP is slow due to amount of files) I use SSH to remotely give command to compress WP directory in single archive and then fetch that file. On Windows this is relatively easily scriptable with WinSCP ( scripting documentation ). This method greatly speeds up transfer, makes it secure, requires no plugins server-side, … Read more

Mysqldump add drop table?

It only affects the output of your MySQL dump in the file that is created. It isn’t necessary. It is just there so that if you import the created dump file into a database that already has a table with the same name, it will drop that table and then add the new table in … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)