[wp-trac] [WordPress Trac] #57269: Force WordPress to get it's siteurl from config not from the databes
WordPress Trac
noreply at wordpress.org
Sat Dec 3 18:27:22 UTC 2022
#57269: Force WordPress to get it's siteurl from config not from the databes
------------------------------------+-----------------------------
Reporter: mhmdyassin07 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version:
Severity: normal | Keywords:
Focuses: multisite, performance |
------------------------------------+-----------------------------
a big problem is facing everyone trying to move a site between two hosting
or between two environments like (staging and production )
the most frequent problem is the site URL and the internal links
and if you have extensive databases it will be your nightmare
so it creates issues and limits our flexibility
so what I suggest is to set the site and home URLs from the wp-config.php
file
like
define( 'SITEURL', 'https://mywebsite.com' );
I know it is not very simple, especially with multi-sites but it deserves
I also tried
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
but if you don't have 'siteurl' option on your site it will give you
'Error establishing a database connection in the front end
and
'One or more database tables are unavailable. The database may need to be
repaired.'
which even not the clear error message
die to
wp-includes/functions.php => function is_blog_installed
I can work on this point but before I spend time, I need approval from the
WordPress team that they will accept such modification or that not be
accepted
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57269>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list