Join the community 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

    117
    36
    28
    Sep 10, 2017
    Ratings:
    +62
    Local Time:
    2:18 PM
    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

    42,798
    9,691
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,954
    Local Time:
    5:18 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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