У нас вы можете посмотреть бесплатно Wp-Cron.php May Be Slowing Your Site - Create A Server Cronjob Instead | WP Learning Lab или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist: https://wplearninglab.com/17-point-wp... These are two pieces of code referenced in the video: define('DISABLE_WP_CRON', 'true'); cd /home/HOSTING_USERNAME/public_html; php -q wp-cron.php When you create your cronjob make sure you replace HOSTING_USERNAME with the username of your hosting account. To find it see the section below called "Finding Hosting Username". -------- Wp-Cron.php May Be Slowing Your Site - Create A Server Cronjob Instead If your site gets a lot of traffic there is a good chance that the wp-cron cronjob is slowing down your site. The wp-cron.php runs every time a page loads on your site. It's checking to see if the site has any scheduled posts that need to be published. This is fine when a website has low traffic, but when traffic is higher it can become a big problem. Here's how to create a server-side cronjob to fix the problem. An interesting tidbit is that if you schedule your posts they won't publish if no-one visits your site. Or they will publish later than you want because people come to your site after the scheduled publishing time. You might be wonder what is cron job. At it's simplest, it is a script that runs at set times and causes other scripts to run. Like a WordPress scheduled post, for example. Let's get to it. There are two things we need to do to move our cron jobs server-side. First we have disable the wp-cron.php file so it's cronjob stops. Then we need create a cron job on the server. To disable wp-cron.php you need to open your wp-config.php file for editing. Inside that file, just below where you have all your database information, paste the following code on it's own line. define('DISABLE_WP_CRON', 'true'); That will disable the wp cron. Save the wp config file and step one is complete. Next, Finding Hosting Username. To find this open the file manager in your cPanel and look for where it says /home/ at the top of the file hierarchy on the left side. Right after /home/ is your hosting user name. Make note of it because we'll need it soon. Now, back in your cPanel find an option called Cron Jobs and open it. On the following page you will see a section called Add New Cron Job. There you will be able to set the Minute, Hour, Day, Month and Weekday of your cron job. At the bottom of that list you will see an input field called Command. Paste the following code into it, replacing "HOSTING_USERNAME" with your actual username: cd /home/HOSTING_USERNAME/public_html; php -q wp-cron.php For the timing options you can choose whatever you wish. I tend to stick with running the cron every 6 hours. To do that choose the following: Minute - 0 (at the beginning of every hour) Hour - every 6th hour Day - every day Month - every month Weekday - every day That will run the cron job every 6 hours on the hour for eternity or at least until you turn it off. Then click the Add New Cron Job button and you're done. You've created your first cron job. Your server and your host will be thanking you when your site traffic picks up! I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter. -------------- If you want more excellent WordPress information check out our website where we post WordPress tutorials daily. https://wplearninglab.com/ Connect with us: WP Learning Lab Channel: http://www.youtube.com/subscription_c... Facebook: / wplearninglab Twitter: / wplearninglab Google Plus: http://google.com/+Wplearninglab Pinterest: / wplearninglab