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]
- Getting an error when I visit http://localhost
- Change site url when moving site to another url?
- Recover WordPress blog from an inactive domain name
- Is it possible just by using wp-cli to migrate one multisite instance to single site?
- How to transfer changes from test environment to live site?
- Export and overwrite pages on import?
- URLs to images get messed up after migration
- Does WordPress Import/Export tool actually exports media (images) as well?
- Migrating my existing WP site to localhost
- Will post id change when migrating to new site?
- Critical Site Health Issue after WordPress Migration
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- call_user_func_array() errors after migrating site with InstantWP
- WAMP to XAMPP WordPress transfer
- We have a static Hugo website and we want to migrate it to WordPress
- How do I force password reset even with wrong password entered?
- How can I migrate (export and import) wordpress users without loosing their password?
- Tags not importing when using WordPress import system
- Transfer wordpress site from web server to localhost
- preventing the duplicate wp_insert_post
- Trying to move an Expression Engine site to WordPress, but not having luck with content
- Migrate ProcessWire to WordPress
- 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
- Moving my newly made site from subdirectory
- What is the difference between wp-admin>Export>All content and MySql dump and import
- Clean private data (passwords, ftp, database) before zipping my site and SQL and give it to other person
- wordpress changing host breaks image links
- Tried to move blogs to a new server – “white screen of death”
- Blank screen after moving WordPress to new server with same domain name
- I changed my domain name and REST API stopped working
- Getting HTTP error 500 after migrating a website
- Problem migrating to localhost
- Serving WordPress in it’s own directory on localhost on WAMP
- WordPress migration to new domain and environment with only zip file
- Clone WordPress site from development server to live server
- Server Migration Issues
- Migrating WP website from local host
- How to remove symlink from folder
- How to transfer from localHost to live but use the already existing database on the server?
- Transfer WordPress
- Server ip to Domain
- Database migration issues – Error #1046 No database selected
- How to enable %postname% permalinks on Mac?
- How can I view my site directly from WordPress dashboard?
- Migrate VB.net website to wordpress website
- How do you do your big exports / imports?
- Import from Windows to Linux
- Page not found after migration to localhost. I already updated the sql links and the permalinks. Wp-admin page works perfectly
- Wrong URL to CSS and JS after change domain
- WordPress shows after migration
- Migration from environment to master WordPress
- How to recover wordpress website moved from a PC to another
- Making a development site live, on Amazon EC2
- How can I migrate asp.net website to a wordpress site?
- Update around 200,000 posts
- Migrate wordpress server to localhost problems
- Cannot combine two site’s pages together
- Migration from XAMPP in windows to MAMP in Mac
- Internal server error
- Redirects and Subdirectory migration to Root Directory
- WordPress giving gibberish and wp-admin gives HTTP 500 error
- Migrating a live WordPress website to a Local Server: why some elements of the website are missing?
- Moved wordpress dashboard still pointing to testing server
- Migrating a WordPress site has broken UTF8 encoding
- How can I use images that are on the server locally?
- How to make Youtube short code transfer
- Restoring .sql backup results in “Error establishing a database connection”
- Error after moving wordpress blog
- Source code get entity escaped after migrating
- Transferring WordPress Instances
- Fast way to copy a Blog x to another domain/server without deleting it
- Migrated from localhost to server and cannot get custom_fields content anymore
- Can’t restore my wordpress site from zip back up file
- WordPress.com blog migration to self hosted WordPress website [closed]
- ColdFusion site to WordPress?
- How do I set up a test environment in a sub-folder?
- Site is broken after transferring to adminer
- Moving wordpress to root folder = internal server error
- How to migrate new web design to an existing website?
- open_basedir restriction in effect after migration from LAMP to WIMP
- How to add Featured Image on WXR from External Conversion