Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#41595 closed enhancement (duplicate)

Prevent end-users from modifying siteurl and home settings

Reported by: desmith's profile desmith Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.8.1
Component: Administration Keywords: needs-testing
Focuses: Cc:

Description

I've grown weary of manually fixing site databases after users see the "WordPress Address (URL)" and "Site Address (URL)" boxes on the Options -> General screen. This is a proposed one-liner fix. By defining the new WP_DISABLE_URLCHANGES constant in wp-config.php, this hides those settings.

Feel free to suggest new names for the constant, this is just the first thing that came to mind.

Attachments (1)

prevent_url_mod.diff (992 bytes) - added by desmith 7 years ago.

Download all attachments as: .zip

Change History (5)

#1 @desmith
7 years ago

  • Component changed from General to Administration
  • Keywords needs-testing added
  • Severity changed from normal to minor

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @desmith, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #10970 and #18769.

#3 @johnbillion
7 years ago

It's also worth noting that setting the WP_SITEURL and WP_HOME has the same effect.

#4 @desmith
7 years ago

True, but it doesn't scale as well. It's so much easier to put one define, that doesn't change, in a plugin that you deploy to all your sites, than to have to put two defines (that are different for each site) into each site's wp-config.php.

Note: See TracTickets for help on using tickets.