You need to have 2 sets of settings one for if file_exists and one for else:
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) {
include( dirname( __FILE__ ) . '/local-config.php' );
define( 'WP_LOCAL_DEV', true );
} else {
define('WP_HOME', 'http://localhost:666/projectname/');
define('WP_SITEURL', 'http://localhost/foldername/wordpress/');
}
Related Posts:
- Custom jQuery code in Elementor page is not working on Mac os. On Windows browser work fine
- How to: Easily Move a WordPress Install from Development to Production?
- Is there a flowchart for WordPress loading sequence?
- Essential technical features for high-end WordPress web hosting? [closed]
- How to remove admin menu pages inserted by plugins?
- How to put logs in WordPress
- How to get the Date Format and Time Format settings for use in my template?
- Where are Additional CSS files stored
- Best Practices for Regression Testing WordPress Websites?
- Remove wrapping div and ul from output of wp_nav_menu
- What Is The Use Of map_meta_cap Filter?
- get post author id outside loop
- Custom Walker: how to get ID in function start_lvl
- Creative uses of WordPress [closed]
- How to *remove* a parent theme page template from a child theme?
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- Multiple Inputs in a Customizer Control
- New WP_Customize API – how does it work under the hood?
- Embedding a SOAP Client into a WordPress Plugin?
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Update widget form after drag-and-drop (WP save bug)
- Data sanitization: Best Practices with code examples
- How to benchmark a WordPress installation? [closed]
- Should I delete the default themes?
- Moving WP install from local to live, what about wp_posts GUID?
- Modified wp.media.view.Settings.Gallery in Backbone JS, but editing doesn’t work
- Running Gutenberg React in Development Mode
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- Some data of one custom user profile is erased when I update another custom user profile
- Change in credit card payment button for woocommerce
- Custom Search on media files PDF images pages posts
- Custom Menu (only showing direct cildren) ACF not showing
- wordpress categories narrow down results
- Is it bad practice to add a filter within a filter in wordpress?
- Local WordPress installation feeding multiple online site sites
- Modifying posts based on category in TwentyTwentyTwo theme
- Permalink Listing WordPress
- Redirection after Category Change for Custom Structure
- How to display product variations on same row
- Has the table name in SQL for WordPress changed from WP_posts to WPCS_post?
- Why after customizing Home Page, the site is loading six missing blob sources, slowing down all site?
- Multi color post title by using custom javascript inside the gutenberg editor?
- Create a page for each database table entries
- Add custom styles to the Raft theme
- Where did I put this one line of css?
- Custom product sorting archive page
- Add custom information in editor summary
- A Voting system for a pageants
- Add line break for menu items
- How do I know if the custom theme is a child theme or a full-custom theme?
- How can I get the Media Library backend to show larger thumbnails?
- Import bootstrap 5 and bootstrap icons in wp-admin backend
- I want to force secondary rows using WP_List_Table
- Customise “Add a New Post” page
- Must I rewrite the whole login form or can I jsut do a part
- Hover Hide-Visible Additional CSS not working in WordPress website, but shows properly in Customize window
- Add a custom field for sorting the products in a specific category WOOCOMMERCE – Second try
- Looking for a way to align log in form fields with background image and scale responsively
- Add a custom field for sorting the products in a specific category WOOCOMMERCE
- Advanced Custom Fields in WP_Query: Href Returning Empty
- woocommerce, add free sample button on product page
- RSS Feed Customization
- How to increase page title font size in twenty seventeen wordpress theme for static home page and single column option
- Display Published Posts Count for Time Period
- How to create a second Super Admin or Super User via MySQL DB
- Can’t change WordPress / WooCommerce attribute value order
- How to move custom icons from parent theme to the child theme
- Mobile version displaying all wrong after custom theme rewrites
- Taxonomy question how to add more data
- Different titles on homepage vs single based on category
- Redirections all subcategory to a new page
- next/previous stays within specific taxonomy term when in single post
- Exceute script on publishing or updating a new custom post record
- How to get a custom taxonomy slug in body classes
- How to use standalone Gutenberg (block editor) instance on any my own admin page in WordPress
- WordPress Page Width Issue: Seeking Solutions
- issues having 2 reader accounts. need to log in to two different accounts
- Is it posible to multiple entry value before submit Gravity forms?
- Images in an RSS feed
- WordPress Responsive Custom Control WP Customizer
- How to edit the new user email notification template
- Encrypt User last name in wordpress for security reasons
- Multiple wp.editor in a custom widget using JQuery
- Unable to edit the 1Homepage
- How to disable the PDF preview in the file block by default
- How do I get the URL section to show use a different domain in the WordPress Admin?
- Custom Logo: why parameters are not working at all?
- Customize style of window alert text
- Block Theme: How to use a different template on front page vs paginated pages?
- Customizing Additional CSS editor
- How to edit text of new user email?
- How do I disable shortcuts in WordPress?
- Querying a meta field on a custom taxonomy archive
- Fatal error with start_lvl and start_el in an abandoned theme
- How To Fix the “Another Update is Currently in Progress” Error in WordPress
- This plugin helps create custom buddypress group tabs but it is producing a 404 error, how can it be edited, is it the screen_function?The code is i
- Newbie question – which css file to edit
- How do i get custom fontSizes and theme fontSizes?
- Create a uniqueId when a block is created or copied