Hello guys!
Happy new year!
Yeah its time to create our folders.
Im not keen on using plugins or whatsoever.
Simple bash command will get the job done man!
Dont forget to test! upload a file image to your wordpress site :D
bye-bye HAPPY NEW YEAR. WELCOME 2020
Happy new year!
Yeah its time to create our folders.
Im not keen on using plugins or whatsoever.
Simple bash command will get the job done man!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. create the folder of the year in your wordpress project folder | |
mkdir -p /project_folder/wp-content/uploads/2020 | |
# 2. then create child folders for every month!!!!! | |
#this is for 01-09 | |
for i in {1..9}; do mkdir -p /project_folder/wp-content/uploads/2020/0$i; done | |
#this is for 10-12 | |
for i in {0..2}; do mkdir -p /project_folder/wp-content/uploads/2020/1$i; done | |
# 3. eh dont forgot to change the ownership of the folders! im using nginx... | |
# sooooo my command looks something like this :D | |
chown -R www-data:www-data /project_folder/wp-content/uploads/2020 | |
Dont forget to test! upload a file image to your wordpress site :D
bye-bye HAPPY NEW YEAR. WELCOME 2020
Comments
Post a Comment