I have a wordpress multisite on a unix server , which I need to replicate on another unix server(lower instance). There are other wordpress multisites on the same unix server which are working properly . Wp cli, php and nginex configurations are also set up correctly.
So far what i have done is:
create a new folder
do a standard wordpress installation.
replace the wp content files with the contents in the existing server.
Migrate the db to new server.
configure wp config get with the new db details.
add new server block in nginex.
I have setup the domain url as the server name itself, as it was like that in the original instance.
nginex is up and running , still the domain url is taking me to redhat server home page.
What step might I be missing?
Related
I am working on a Symfony project (eshop website). I developed my website with symfony 5.4 and I have been using the command symfony serve to get a live server during the development.
My website is actually working well, but now I need to personalise the url and not using localhost or 127.0.0.1 url by default anymore.
I added the new url I chose in the ".hosts" file in the directory "C:>Windows>System32>drivers>etc" and the server info in the "httpd-vhosts" file in the directory "wamp64>bin>apache>apache2.4.46>conf>extra". Then I used the command "composer require symfony/apache-pack". My website is now working on the new url and I still GET all the data from my Database.
The issue is that I can't Post data in my database anymore using this new url. For example, I can't add a new User, add a product to cart or log a user.
But everytime I run the website with the "symfony serve" command and use the url 127.0.0.1, everything is working well (Add or log user, add product to cart etc.).
Did I miss a dependencies to run it well on the new url ?
I've spent a couple of days on this and it's probably an easy problem to fix, so I appreciate the help. I have MAMP installed and running locally with the document root path pointed to a folder named websites. In this folder I have 2 Wordpress websites, one that is working (website 1) and one that is not (website 2). I'd like help getting the Wordpress website that is not working (website 2) to work. The problem I'm trying to solve is to get a locally running version of a Wordpress site that was created using a one-click install feature from my hosting provider. This remote site has significant work that I'd like to replicate locally so I can improve it.
When I copy the remote Wordpress files, generated by my hosting provider, into my local websites folder, using FTP, Wordpress does not run at all, because it needs to connect to the database. I exported the data using phpMYAdmin from my remote site and imported it into my local phpMyAdmin and tried updating the wp-config.php file to reflect the local changes. However, the local site will not connect to the database, unless I completely reinstall Wordpress (losing all the changes to the site that I'm trying to download in the first place). The moral is I can't run the install process without losing my work.
The error that is displayed in the browser when I navigate to the second(not working) site, without running the install process, depends on what I have saved in the wp-config file:
Configuration #1: Inputs to incorrect working website 1 database - DB1
DB_Name = 'website_1_DB' //can't use this db
DB_User = 'local'
DB_Password = 'SHA1'
DB_Host = 'localhost'
localhost:8888/website1/ -> Output: Website 1 works fine
localhost:8888/website2/ -> Output: Error Establishing a Database Connection in Wordpress
Note: the above configuration was used in two different web-config.php files for both website1 and website 2.
Configuration #2: Correct DB2 and root user
For this configuration, I have confirmed in phpMyAdmin > DB2 > Privileges that root has 'All Privileges'
DB_Name = 'website_2_DB'
DB_User = 'root'
DB_Password = 'root'
DB_Host = 'localhost'
localhost:8888/website2/ -> Output: ERR_Connection_Refused
Configuration #3: Correct DB2 and added user from DB1
For this configuration, I've essentially used the user from Configuration #1 (working user) with DB2 (correct DB)
DB_Name = 'website_2_DB' //can't use this db
DB_User = 'local'
DB_Password = 'SHA1'
DB_Host = 'localhost'
localhost:8888/website2/ -> Output: It wants to run the Wordpress Install Process
Additional Information:
I have debugging turned on.
The table prefix seems to be accurate.
I've read these articles and posts.
How to Fix the Error Establishing a Database Connection in Wordpress
How to Edit wp-config.php File in Wordpress
Beginner's Guide to Wordpress Database Management with phpMyAdmin
How Wordpress Actually Works Behind the Scenes (Infographic)
Migrating a WordPress site to localhost
Connect Wordpress to the database
Wordpress: Workflows (2015)
I changed the web-config-sample.php to web-config.php essentially installing a new instance of Wordpress, which did connect to the correct DB1. However, what I'm trying to do is work on the Wordpress site that was created on the remote server. I'm trying to avoid having to reinstall the theme and update the configurations locally, but is this the only way? It seems like I should be able to move the whole installation back and forth between the server and localhost, with different configuration files, as different versions.
I think the problem is my method for migrating the website from the remote server where it was originally installed using my hosting service's 'one-click-install.' I just downloaded all the Wordpress files using FTP, then I then exported and imported the database using phpMyAdmin, updating the siteUrl to be as follows:
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES
(1, 'siteurl', 'http://localhost:8888/website2/', 'yes'),
(2, 'home', 'http://localhost:8888/website2/', 'yes'),
For website 1 (working locally), I followed a tutorial, but I can't remember which one. According to this infographic, there are a lot of places for me to look, does anyone have any clue where to start? Am I on the right path? It's obviously possible since I've done it before, but I've forgotten how I did it.
The bottom line is, how do I get a locally running copy of my remote Wordpress site?
Thank you for your help.
I don't recommend moving manually as it is quite a lot of work. You could use a WordPress Backup/Migration Tool to make this task easier. These plugins replace all the URLs automatically and you don't have to do anything.
Install a backup plugin on local WordPress site like Updraft or Duplicator.
Backup your website completely with the plugin.
Research and wisely choose the best web hosting provider for your WordPress site.
Get a domain name and setup the nameserver correctly to the web host (remote server).
Install the same backup plugin on your web host (remote server).
Upload the backup of your website via the backup plugin.
Done. Now your website will be live on your domain in your web host (remote server).
NOTE: If you are using some kind of page builder plugin on WordPress like Elementor, ensure to replace the existing URL (http://localhost/) with the new URL (https://example.com) using Elementor's Settings and Regenerate the CSS using Elementor's Settings.
You can find these settings on:
WP Admin > Elementor > Tools > Replace URL
WP Admin > Elementor > Tools > Regenerate CSS
I know the paint that you faced. I also run WordPress on my VPS. You might want to check updraft plugin to backup all your remote files and install them back to your local machine.
Or another thing is, I recommended that you use duplicator plugin. Good luck
I thought I followed the steps to migrate my WordPress site over to a new host correctly but when I navigate to the new site I am getting redirected to the WordPress installation page. Here was my process:
ZIP'ed up all of the files of my old WordPress site
Exported the MySQL database
Uploaded and unzipped the files on the new host
Imported the MySQL database on the new host
Changed the database connection information in the wp-config.php
Changed the siteurl and home in the database options table
Obviously I am missing something but it is not jumping out at me as to where or what I have overlooked.
At first glance you have done enough it probably should load. Looks like the wp-config is invalid or missing if it's wanting to do a new installation from scratch. Check file permissions and server logs. Use wp cli to try and verify parts. E.g. wp db cli will try and connnect to the DB, so that should fail if the DB connection isn't right (quite a likely cause) and wp shell will give you a PHP console with WP laoded - I find this often prints out useful debugging info if it fails.
However, am I right in deducing from your "Changed the siteurl and home in the database options table" that you migrated not only to a new host, but a different domain as well? In that case you need to change much more in the DB than just those two settings. WP stores all internal links as absolute URLs for example. I would again use wp-cli. The following command is fairly powerful and wide-ranging, so think through your values, but I use it for this kind of migration:
wp search-replace 'old.domain.name' 'shiny.new.domain.name' --all-tables
If it's a multi-site installation, there's a constant in wp-config.php for the default domain that needs updating too
I have a running version of FileRun.
When I move it to another subdomain (new: fps.***.com old: demo.***.com) it displays the error This software application is registered to a different server hostname.
But I have followed this doc for migrating.
I have changed the MySQL connection.
I have exported the database and
used find & replace to change all demo to fps.
Any suggestion?
You have to delete the file system/data/filerun.dat to unregister the installation. You can afterwards re-register the installation from its control panel, via the new hostname.
Back story- I have a site up and running fine with up-to-date wordpress & woocommerce. The owner wanted to re-do all of the products & to get a new domain name; since the old site is working fine & he has customers placing orders daily, I made a copy of the website using godaddy's installatron & assigned it a subdomain name. Everything was working fine, i thought.
While installing new plugins (Woocommerce, WP All Import, etc.) I am noticing that all the plugins' HTTP requests are being made to the old domain name. The old site is still live so many requests actually still make it just fine, but new plugins aren't working because they are trying to get JS files from the old domain (not the new one).
I've tried setting the WP_CONTENT_URL to the current domain explicitly but it doesn't change the request's location.
Any ideas of issues that could have arisen from the site transfer or the hosting? I'm currently running a grep on the WP files for the old domain name but it's gonna take a while.
Before you begin with this, make sure that you have a backup of your database just in case.
If you have access to the SSH of the Wordpress files, you may use WP CLI. Try running the command below to check if there are replacements:
wp search-replace 'old_url' 'new_url' --dryrun
If there are replacements, that means that you can change the old_url to the new url. Just remove --dryrun to proceed with the changes.
Ended up figuring it out-when I said I had set the WP_CONTENT_URL, I was doing so at the end of the wp-config file, after constants had already been defined. Moving it up before the following line fixed everything:
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/')