WordPress stores site url and home url in database. And it can have only one value.
The easiest way to do it, would be to change these options to localhost address.
If you do so, you will be able to work on this WordPress on localhost, but remote installation won’t work (it will redirect you to localhost).
Another way to do this, is to fake DNSs response and set this domain to point on your localhost. You can do this by editing etc/hosts file, and then setting virtual host on your apache server.
I prefer second solution. WordPress will still work on remote server, and by editing etc/hosts file I can quickly change which WordPress will I see.
Related Posts:
- Does WordPress not use relative URLs?
- WordPress development using Docker – how to share directories? [closed]
- Can I develop a WordPress site without a domain?
- Development environment
- Extend WordPress Core Classes in OOP Theme?
- How to do big modifications to live site?
- Custom Post Types database persistance. Why not?
- New WP_Customize API – how does it work under the hood?
- Data sanitization: Best Practices with code examples
- Prevent WordPress from automatically installing a new theme each year
- Can we use one WordPress installation for multiple databases, domains and content directories
- How to include own css on wordpress tinymce editor?
- how to override woocommerce specific loop or archive-product.php [closed]
- How to Add Customizer Setting in Child Theme
- When adding a custom REST endpoint, where do you put the endpoint function, and where do you put the function registration call?
- global menus made from master site’s custom menus wpmu network
- Capability to edit own posts and not others
- Make page template that is just an “include” of another?
- Is there a way to create invisible pages?
- Which freelance sites are recommended to find WordPress developers/programmers, etc
- Count widgets of a certain type
- Custom widget select options needs to stay selected after save
- Syncing Avatars across multisite
- How to move the wordpress site from test url to main url? [duplicate]
- How can I get the intended URL in a 404?
- Creating user relationships
- Multiple sites/domains with content all managed by single installation of WordPress
- How to change email address used for registrations?
- Loop through custom fields with similar label / common chars in label
- title, content, feature images
- How can I make site-wide content editable, for example footer content
- Custom Facebook share button with custom title,url,image in wordpress
- Sort posts by multiple meta key values
- I want to submit multiple users if checkbox is checked
- How Do I Remove The Right Hand Block On The Main Header?
- Category selectable homepage
- Create custom dashboard for Multisite admins
- need help with a user-specific custom page template
- Add custom profile field only for site admins?
- Alphabetical Custom Menu
- Integrate wordpress into index page
- Highlight comments of all the site authors
- Creating custom database table with crud operation
- Allow guests to use WP Customizer but disable save button
- Adding comments to my custom theme
- Add content in between of foreach
- How to insert a writing panel between the title and the page content?
- Show “Read more” link only when inserted manually
- Woocommerce product permalink not working
- Show custom message/info for authors in add/edit post page
- create Custom field for tv series
- Data won’t save if metabox within conditional in admin. What am I missing?
- Restrict Viewing of post on both front and backend?
- I w’d like to know If there are simple solutions to integrate other CMSs to wordpress
- add_feed rewrite overwriting standard permalinks
- Create a page that dynamically loads data
- Editing a post template
- Gravity Forms – gform_field_value – query custom table breaks functions.php
- Customizer – How to get theme mod range value?
- Let author add field to metabox by pressing a button
- Date Ordered Archive Page for single category?
- GUID URL Question
- Inline-Table under TwentyTwelve not working
- Allow a subscriber to be an author and view only his post
- Trying to use .htaccess to redirect /profile to /login-2?action=profile
- How to make WordPress search page use a relative path
- Woocommerce custom archive page custom content and shortcode
- We are facing this error in header unable to understand the issue
- When is the wp-settings-[time] cookie generated?
- What is my error trying to create a new table in the database?
- Need to add custom text field to Woocommerce under add to cart button
- Hide entry-header for a specific category
- How to add a template – so that i can choose a different menu for some pages
- Allow WP users to sort search result on a videos site
- wp.blocks.registerBlockType not showing what I want on the frontend
- Multiple loops on same category with different design
- Add a menu item to admin dashboard which isn’t a link? [duplicate]
- How Can I add show_post_count in get_archives_link?
- How to add the option to choose between sizes for featured image within post editor?
- Customize WP website specific column with CSS
- Help needed creating a custom Hamburger menu in header
- admin aoolbar add_node() and pulling in my post slug
- Structure of post types for TV Shows and episodes
- Custom Form Input not saving to Database
- Adding images to anchors in the list created and fetched with wp_nav_menu
- In wordpress customizer api adding div wrap to control
- How to create 2 preview button in a post?
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Secondary loop doesn’t work
- Custom user fields validation on registration
- Pre_Get_Posts order DESC not registering
- Adding pages to the Admin panel
- Share user access between two wordpress sites
- What capability is required to view posts, scheduled in the future, by someone else?
- Custom Query Arguments
- Adding page Title in a custom coded page
- Reached end of document without finding – using mod_pagespeed
- Gallery Pagination by Row
- use another theme for just one page
- How can I make a search term redirect to a page