Discover Centmin Mod today
Register Now

Not sure where to place WP related scripts

Discussion in 'Blogs & CMS usage' started by Jay Chen, Jan 14, 2020.

  1. Jay Chen

    Jay Chen Active Member

    181
    60
    28
    Sep 10, 2017
    Ratings:
    +116
    Local Time:
    6:45 AM
    Hi guys,


    I wrote some WP related scripts that I will execute via cron once a day.
    I am thinking to put the scripts in the site's public, but I don't want anyone to be able to access it from outside.

    Where is a good location to place these scripts so that it can still be evoke by cron but unable to be access from outside, for example via url.
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,920
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    8:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you can try at /home/nginx/domains/yourdomain.com which would be one level above public web root at /home/nginx/domains/yourdomain.com/public as outlined at https://centminmod.com/configfiles.html