« first day (3015 days earlier)      last day (1918 days later) » 

12:49 PM
greetings
seems like everyone dislikes questions on how to customize the WP experience, if I didnt know any better I'd think they just use the default theme ¯_(ツ)_/¯
 
1:38 PM
@Mᴏɴᴋᴇʏ What do you mean?
 
2:14 PM
@ChristineCooper I keep getting this answer a lot: wordpress.stackexchange.com/questions/325796/…
I'm lazy, and if I can learn a way to auto setup my environment in WP I think that be a win, lol
 
2:28 PM
@Mᴏɴᴋᴇʏ themes are not supposed to implement backend logic stuff
on top of that there's no reason for you to do it that way, a plugin would be just as easy if not easier, by doing it in a theme you introduce a whole new set of problems
> I'm lazy, and if I can learn a way to auto setup my environment in WP I think that be a win, lol
Why not ask that?
There's tonnes of examples, be it composer, WP CLI, or site creation scripts such as those used in local dev setups like VVV or Chassis
one final note though
the uploads folder is the uploads folder, and leave it at that
as long as it works, there's no reason to meddle in how WordPress stores things, it's just extra effort with no gain
treat it like the vendor folder in composer, and let WP do its job
the moment you start meddling the moment problems appear
e.g. if you got your answer, the moment you switched theme your uploads folder would be a mess of 2 clashing organised systems
which wouldn't be an issue if you'd used a plugin, or an mu-plugin file
but even then, it complicates imports and exports further
and can introduce unforeseen issues
Also looking at that question, the upload_dir avenue is not a good avenue to take
forcing an option on can be done via filters
but changing the upload directory is like being unhappy with a sentence and instead of changing it, you go to the company that prints the dictionaries and change the meaning of the words to match what you wanted
I know you think this is ok because it's for your personal site and theme
but it's habit forming
and be honest, will you still be using the same theme in 10 years time?
what about copy pasting stuff over, and what about edge case scenarios where you might not load the theme such as some WP CLI commands? Or if the site becomes a multisite? Or you reuse your personal theme for other reasons
 
@TomJNowell because I haven't written an mu-plugin before
 
@Mᴏɴᴋᴇʏ you could ask? It's literally just a PHP file in a folder
 
so all backend default logic I want should be an mu-plugin?
 
it doesn't even need a plugin header
no because the problem with mu-plugin files is that they can't be disabled or deactivated
and you can't just copy paste a plugin in to the mu-plugins folder
they also run before plugins, so you can't rely on plugin APIs outside of hooks
so just use plugins
mu-plugins are helpful for install wide things that are self contained
but a plugin header is trivial anyway
 
well I have settings I like when I build personal sites and update themes.
 
2:40 PM
/**
 * Plugin name: Tom's plugin
 **/
have you considered using another approach?
 
I like adding custom settings to wp-config, changing the img directory and how it defaults images so I should do all that in an mu?
 
e.g. if I like my options set a particular way, lets say I like to set my permalinks one way and a tagline, I use WP CLI when I first setup the install
I'd suggest not doing a lot of those things
 
ok, well I guess that answers if I can set the permalink through a plugin
 
but yes you could put the filters that enforce those in an mu-plugin
how do you think the permalinks settings page does it?
 
@TomJNowell why though? That's what I want to learn.
 
2:42 PM
@Mᴏɴᴋᴇʏ because it's extra effort for no gain
 
@TomJNowell modifies the htaccess from what I can tell?
 
@Mᴏɴᴋᴇʏ that doesn't explain nginx users
besides, the htaccess file is always modified in the same way
it doesn't control permalinks
 
gotcha
 
it just inserts the necessary htaccess rule to map the request properly on to WordPress if it's not there
but if you don't want to go into settings, and manually set a tonne of options by hand, automate it
wp option update timezone_string "America/New_York"
then gather all those commands into a script, call it monkey-setup-site.sh or something, and hey presto
now you have all the options set how you want them, and you can even change your mind later on, no code written
 
@TomJNowell I like that idea, will need to research into it
thanks
 
2:47 PM
you can automate the entire download, wp-config etc process with scripts
 
@TomJNowell havent done that approach but I like the idea of that
 
I don't know if it's still maintained but Daniel Bachuber wrote a tool for it github.com/danielbachhuber/dictator that adds to WP CLI so you can write these things as configs
but going back to your original question, it's an X Y question, focus on the original problem of always having to go through and set a tonne of options and things will turn out better
granted there's a chance that particular one could have been offtopic as primarily opinion based, lots of people do it in different ways
 
 
1 hour later…
3:53 PM
Hello :) Are there any known problems/caveats with having many users registered in one WP instance? Say 1000 users of a very specific & limited role.
Of course privilege escalation bugs get really serious then, but aside will there things to extra consider?
(Such as a WooCommerce store with lots of products needs extra attention for transients and db in general)
 
4:06 PM
@kero wp.com has millions
and I know of many multisites with hundreds of thousands
so no, any issues with escalation would be just as much an issue with 10's of users
just don't do things like trying to list all users at once, etc, which should go without saying, same is true of posts
 
@TomJNowell I keep forgetting that is a giant MultiSite
thanks for the quick feedback, Tom!
 

« first day (3015 days earlier)      last day (1918 days later) »