How to start a script from cli within wordpress

Xaedes solution in https://wordpress.stackexchange.com/a/76466/107596 works quite well: <?php if( php_sapi_name() !== ‘cli’ ) { die(“Meant to be run from command line”); } function find_wordpress_base_path() { $dir = dirname(__FILE__); do { //it is possible to check for other files here if( file_exists($dir.”/wp-config.php”) ) { return $dir; } } while( $dir = realpath(“$dir/..”) ); return null; } … Read more

Scheduled posting not working

You don’t need that line in wp-config.php as wp-cron is enabled by default. If you install the Cron View plugin you are able to see when the different jobs are scheduled. You can then trigger wp-cron manually by going to this URL with your browser: http://your-domain.com/wp-cron.php?doing_wp_cron If after this the actions you expected where successfully … Read more

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