I was able to solve the problem by adding these two lines to /var/www/my-wp-site.com/public_html/wp-config.php
:
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
Related Posts:
- Error migrating from live website to localhost
- Why isn’t my imported database showing up? install.php pops up and adds new tables to the database
- After finishing building a site on localhost, how do I transfer everything to a client’s server?
- Localhost: WordPress redirecting to a different URL
- Why is the domain name missing from the logout redirect?
- Can only access homepage and admin panel
- Migrating to local server
- Absolute Hyperlinks in WordPress Website Will Not Work In the Local Server
- Issue In Links after migrating from Live server to Localhost XAMPP
- Migrate site from local to local via a backup
- Move wordpress files from one pc to another pc contents showing error
- Migrating WP site to localhost using Duplicator
- Transfer WordPress intranet site from my pc to the company local server
- Moving WordPress site from local PC to local Mac
- How to transfer /wordpress folder from one Mac to another
- WordPress migration from live server to localhost having 404 error? [closed]
- How do I setup my cpanel site backup on a local host?
- How can i convert my Delphi.NET project to Delphi Prism?
- Getting an error when I visit http://localhost
- Localhost is not working
- Moved WordPress to New Server, Now Tries to Download a File
- Do you have any effective strategies for launching a v2 of a WP site?
- Migrating Markdown (from Drupal)
- Change site url when moving site to another url?
- WordPress Subdomain MultiSite on localhost XAMPP on :8080 with IIS taking port 80
- Migration issue – blog home page is blank
- Recover WordPress blog from an inactive domain name
- Broken CSS after changing the site URL
- Is it possible just by using wp-cli to migrate one multisite instance to single site?
- Make WordPress “readonly” on a given site
- Is there an easy way to migrate a site from SiteFinity to WordPress?
- How to transfer changes from test environment to live site?
- Migrate Changes from a Staging Site to Production
- References to other site everywhere in WordPress site
- Plugins to clone wordpress site and move to another url
- Change old URLs after the domain change
- 500 Internal Server Error after attempting to switch from subdirectory to addon domain
- Export and overwrite pages on import?
- problem migrating files from https to http mock site – how to see mock site
- Best practices for making a WordPress site “movable”?
- How to upload local changes to a live server without overriding new posts/pages?
- URLs to images get messed up after migration
- How can I assign post a specific ID on creation?
- Migrate localhost to server
- Migrating WPMS from apache to IIS7 causes Database Error
- What’s a better workflow for database migration?
- Moving WordPress from live to local server
- Error establishing a database connection After Copy localhost wordpress site (with site url directly to hosting server’s url before copy)
- How to migrate from wordpress.com to self-hosted wordpress
- Does WordPress Import/Export tool actually exports media (images) as well?
- Links after moving my site to another domain
- Migrating my existing WP site to localhost
- Will post id change when migrating to new site?
- How to just migrate posts/pages from one site to another?
- Setting up WordPress playground and deploying to production server?
- How do i migrate a Multi site to individual site?
- Critical Site Health Issue after WordPress Migration
- Migrated site redirects to localhost after successful login
- How do I redirect my blog posts to a subdomain?
- Can’t see login page after migration
- Copying wordpress to another server breaks it on original server
- Migration / convert an existing site to WordPress
- Install WordPress on new server or just copy old files?
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- Remapping absolute URLs from other domains and from test domain
- Can I setup WordPress in a subdirectory and then point my URL to the subdirectory when I’m ready to go live?
- call_user_func_array() errors after migrating site with InstantWP
- Moving a WordPress site from one folder to another (one domain, one server)
- WAMP to XAMPP WordPress transfer
- how do i find out why links point to my old domain
- We have a static Hugo website and we want to migrate it to WordPress
- Save (same) permalink from wp-cli
- How do I force password reset even with wrong password entered?
- Changed site URL and now my Front Page doesn’t display correctly
- How can I migrate (export and import) wordpress users without loosing their password?
- WordPress Odd migration issue
- How to copy WordPress live website to Bitnami stack localhost?
- Tags not importing when using WordPress import system
- Ways to work offline with your WordPress
- Moving minor updates between local and live sites – just database?
- Transfer wordpress site from web server to localhost
- Move from Subdomain to Root
- Migrate from CMS Made Simple to WordPress
- Migrating entire online site to local server gives “The requested URL /login/ was not found on this server.”
- migrating local dev site to live site with no downtime
- How do I fully migrate post images from one WordPress site to another?
- preventing the duplicate wp_insert_post
- WordPress Network (MU): Copy Main Site to Sub-Site
- Is there a way to migrate via wordpress dashboard?
- Trying to move an Expression Engine site to WordPress, but not having luck with content
- Changing WordPress domain
- Migrate ProcessWire to WordPress
- Preserve password hashes when migrating to another server
- Nginx mamp pro5 migration home page works all other do not
- Automatic Maintenance Mode during All in One Port
- migrating my wordpress site
- Moving WordPress page to a new domain
- Is it possible to transfer my local installation entirely to the server?
- Why WordPress isn’t and/or can’t be domain agnostic
- How do I migrate a Website of this size ( Archive: 24GB, DB: 256 MB )