Assuming you’re running cron jobs under your user account, it will have access to any folder that your account has read access to. If you do not need them to be publicly accessible, and you have access to a folder outside your public web root, then for security purposes you should put them outside of the web root.
However, if you are on shared hosting, this may not be possible due to open_basedir
restrictions. In that case, you can either create a subdirectory under your main WordPress directory, or in your plugins folder. You can add an htaccess file to block access from the outside.
Related Posts:
- How do I log plugin (cron) actions?
- How to check WordPress website username and password is correct
- Cron firing my function everytime wp-admin is visited
- WordPress REST API call generates nonce twice on every call
- How Do I Make WordPress Run an Event Every Day?
- get_posts / WP_Query Memory size of 134217728 bytes exhausted
- Hourly WP schedule, do I need at least 1 visitor hourly?
- How to: Rest endpoint returning empty object
- Custom endpoint that returns an xml
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- Scheduled event does not run at midnight
- Rest Api How to get results of child categories with one api call
- Is it possible to load plugin from console with core ?
- Is there any background process that I can run from plugin without depending on page hits on a website without affecting page-load speed?
- WordPress cron running twice
- WP rest api v2 posts filter by ‘search’ & ‘category_name’ not working
- What method to use to call a REST API?
- Will cron job run if page loaded is being served from cache?
- WP REST API V2 – Add user data to response
- Loading WordPress Admin Environment
- How to schedule a cron job in plugin without waiting for page load request?
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- How to get results of subcategories also?(WP Rest Api v2)
- Amending REST API function without deactivate/activate plugin every time changes is made
- Create a new post using rest api and save featured image using an external image url
- Adding custom end points, No error line
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- Secure REST with nonce works only when not logged
- How to do POST request with WP REST API v2 to custom table?
- Problems with cron
- How to Trigger WP CRON at Local Timestamp?
- rest_no_route on custom API endpoint wordpress
- Custom Rest Endpoint: Post/Put/Patch not working
- Can’t retrieve body params from PUT endpoint using formdata
- Do I need to create an endpoint?
- WordPress Rest API with rest_do_request, possible race condition?
- How to use apiFetch to get author information in Gutenberg properly?
- Mock a dependency of a WP_REST_Controller class
- update_callback is not working in register_rest_field
- REST Endpoint API 404
- Allow REST API Endpoint to specific user and hide from public
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- How to do admin ajax request in a plugin for rest api
- Attaching Image-file to userId
- Query String Filtering API
- Custom plugin & calling REST api of wordpress instance the plugins is running on
- GET request return value as error instead of success
- How to query a nested field in wordpress api using _fields param
- Get Custom taxonomy parent with wordpress REST API
- register_meta not showing custom post type metabox data in rest api
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Securing custom rest API endpoints with public access from PWA
- WP_Query not ordering correctly
- 403 error rest_’cookie_invalid_nonce’ on API Request
- Adding Amchart Interface to WordPress API
- WC REST API Error Handling
- Initializing rest endpoint issue
- Plugin with functions inside a class & how to trigger WP CRON
- Multisite and the JSON REST API: How to?
- React in plugins: REST endpoints vs. regular functions
- Query only title/field/featured media of posts [closed]
- WP API users per page
- WP Cron as Fast as WordPress AJAX?
- What is the use of wp_schedule_event hook?
- Is it safe to use PUT and DELETE requests
- Is it possible to make WordPress as a RESTful app?
- Running one-off cron jobs when WP_DISABLE_CRON is true: can I hit /wp-cron.php?
- oneOf two possible objects in WP REST API?
- How to update WordPress Plugins in your own maintance application?
- Extend Plugin that creates an endpoint for GET request to also accepts POST requests
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Rest Api WordPress
- External api call using wordpress
- Does WP REST API cache internally executed (rest_do_request) requests?
- Run different permission_callback depending on HTTP method of custom REST API endpoint
- REST API error in block editor for custom templates
- How to get locale within WP REST Request?
- Execute callback after REST API request completes + Response is sent
- How to boost WP custom post REST API GET queries by custom taxonomies
- Plugin – create a page without it appearing in the side menu
- How to write testable classes in WordPress
- How can I call “preview post” from wp_remote_get with authentication?
- When is it too late to call the action wp_enqueue_scripts?
- need to get user ID after a user logs in
- Callback is not called in add_settings_field() when passed as part of an array, but recognises that it’s there. It’s passed Class to Class using OOP
- Putting a resized image into media library with wp_get_image_editor(
- Using ReactJS in the WordPress admin for plugin development
- How to use github to update my plugin
- Settings API – format container of setting and setting’s description
- Delete option of a Plugin
- Proper way to include stylesheet for panels
- WordPress Gutenberg InnerBlocks renderAppender not showing with template
- How to share user data across multiple WordPress websites?
- How to add .ini file type to the plugin editor to read and edit?
- WordPress Ajax not returning Response
- auto create only 1 wp page in activate custom plugin
- How to create a custom search form and handler?
- Method to retrieve category names and IDs only as an array?
- Using “add_image_size” to register custom image sizes inside plugins not working
- How do I access the contents of WordPress Classic editor in admin area with JavaScript?