Wrong hostname after migrating FileRun to other sub-domain - php

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.

Related

How to get locally running copy of Wordpress Site installed on remote server?

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

WordPress migration is redirecting me to do a new installation of WordPress site

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

Error establishing a database connection on localhost xampp os x

i am very beginner in wordpress and want to learn it and the first step was fail :(
i tried to install it on localhost (xampp) and this error "Error establishing a database connection" kept shows
i did every step in this video https://www.youtube.com/watch?v=A3fXcvnzlkw
install xampp-osx-5.6.30.
turn on mysql database and apache server.
go to phpmyadmin and add new database name it "wp".
download wordpress 4.7.2
copy the wordpress folder to htdocs then rename it to wp.
go to wp-sample-config rename it to wp-config change the database name to wp, database username to root and database password empty ''.
in the browser localhost/wp/wp-admin/install.php
then the error shows
i tried to add new user in the phpmyadmin and change the wp-config
i tried to change the database host from localhost to 127.0.0.1 in wp-config
i tried to unistall xampp twice
i tried different program mamp
nothing helped
my os x version is os x yosemite 10.10.5
should i change any sittings in my computer?
is there any programs that i may install it causes the problem?
what can i do?
here some photo
wp-config /
Steps 6 and 7 aren't needed. WordPress creates the wp-config.php file when it discovers that there isn't one there. It prompts you for the database username, password, server (default localhost) and table prefix that you want.
Then it will ask you for some information about the site. Normally that's all you need to do, it will set up wordpress for you from this information. It might not like an empty password for the database user though. If you haven't changed the password you could try root as I think that is the default - root/root
You need to check first that xampp is working correctly though e.g. by outputting a simple html file.

Wordpress version issue

I have a Wordpress 4.5.4 website I downloaded from a remote server to my local development server installing both, the files and the database.
On the remote server is working "apparently OK" but on my local server is doing something strange because on lot of files is doing the following appending:
http://<domain>.com/wp-content/themes/mytemplate/style.css?ver=1.8.4
Notice the version at the end: 1.8.4 while the current version is: 4.5.4
(this situation happens with lot of files)
Then I checked on the server and for these files the version at the end is the right one: 4.5.4
Then on both, on the remote server and on the local development server I read the global variable: $wp_version and on both cases I got the right version: 4.5.4, so I don't know why the 1.8.4 at the end as default version for those files on my local development server?
On my local development server the website looks really different than on the remote server and the files I download as well as the database is the right one, because on the root of the remote directory I put a dummy file and I can read it via the browser using the url. Also, I tried changing the database password on the wp-config.php file on the server and I got database connection error, so the files I downloaded and the database are the right ones.
Any idea on how to solve this?
EDIT 1
Remote server: CentOS release 6.8 / PHP v5.3.24 / MySql v14.14
Local Dev server: Windows 7 / Wamp64 / PHP v7.0.0 / MySql v14.14
EDIT 2
On the local development server I modified the .htaccess file and the Windows' hosts file to use the same domain and avoid the necessity of these kind of changes (and be totally transparent for browsers). I do this with tons of websites, so for me is a normal procedure. Then my problem is not a localhost/domain.com conflict.
The version add in a wp_enqueue_script() or wp_enqueue_style() is an optional value, and is related to the script version.
This value could be add the developper for caching purpose but it is not always corresponding to the WordPress version. The example you show is only relative to the theme and it's certainly hardcoded by the developper (this could be great to show us the wp_enqueue_style() ).
If version is set to false, a version number is automatically added equal to current installed WordPress version. But, some script can check and enqueue different file (I think about for minify css that will not load when you are enqueuing file locally).
In case, verify that both server show the same
get_bloginfo('version');
If not, change your local value with phpmyAdmin.
Hope it gives you some hints.
You need to manually update the siteurl and home options in the _options table and replace your domain with something like http://localhost, and remember to add the port number if you are running it at a different port than the usual 80

Setting up pyrocms/codeigniter on localhost

I am having trouble getting a project to work that I have inherited and not setup myself. I install the DB and make sure the file/folder permissions are correct -- but I am getting this error when I try to get to the local site -
This domain is not set up correctly. Please go to http://localhost/myproject/sites and log in to add this site.
I get that error again when I go to that URL... so not exactly helpful on 'adding sites'.
Is there any way to setup a local site in the database manually without using the installer?
Check the field "domain" in the table "core_sites" in your PyroCMS DB.
This field should be set to the domain you're open the website on.
This is usually caused if you're installing PyroCMS through a different URL, than you use to open the website.
e. g.
install through http://dev-server/website/pyrocms/installer, but call the website on http://pyrodev.local because you've set up a virtual host and corresponding DNS entries.

Categories