multisite - Error establishing a database connection after moving local wordpressmultisite from one directory to another

admin2025-06-02  0

Good day together, as the title mentions, i want to clone a local wordpressmultisite(i use xampp) to another directory. the first existing mutlisite runs under xampp on http://localhost/Wordpress. the second blog of this wpms can be reached under http://localhost/Wordpress/buddha. this multisite is working fine.

Now i want to run a copy of this multisite installation under http://localhost/wp-buddha. So i copied all files and directories from the htdocs/Wordpress directory of xampp and paste it in a directory named wp-buddha ind the htdocs of the xampp directory.

In the next step i created a new databse named buddha by using myphpadmin on localhost. i created also a user for this database named buddha with the passswort buddha.

then i exported all tables from the first multisitedatabes to a sql file and imported the sql file in the nwe buddha databse.

I changed in the new multisite the databse informations such as databasename passwort and databaseuser to the new one.

Now, i my understanding, wordpress should be able to connect to the new databsse called buddha, even if the paths of the subdirectories are not actual.

But when accessing the site over http://localhost/wp-buddha there appears: Error establishing a databse connection.

I tested the databse informations with a php-script: they arte correct. Can anybody give me a clue why tha database connection isn´t working properly? thanks for any help.

Good day together, as the title mentions, i want to clone a local wordpressmultisite(i use xampp) to another directory. the first existing mutlisite runs under xampp on http://localhost/Wordpress. the second blog of this wpms can be reached under http://localhost/Wordpress/buddha. this multisite is working fine.

Now i want to run a copy of this multisite installation under http://localhost/wp-buddha. So i copied all files and directories from the htdocs/Wordpress directory of xampp and paste it in a directory named wp-buddha ind the htdocs of the xampp directory.

In the next step i created a new databse named buddha by using myphpadmin on localhost. i created also a user for this database named buddha with the passswort buddha.

then i exported all tables from the first multisitedatabes to a sql file and imported the sql file in the nwe buddha databse.

I changed in the new multisite the databse informations such as databasename passwort and databaseuser to the new one.

Now, i my understanding, wordpress should be able to connect to the new databsse called buddha, even if the paths of the subdirectories are not actual.

But when accessing the site over http://localhost/wp-buddha there appears: Error establishing a databse connection.

I tested the databse informations with a php-script: they arte correct. Can anybody give me a clue why tha database connection isn´t working properly? thanks for any help.

Share Improve this question asked Mar 9, 2019 at 16:58 user162820user162820 1
Add a comment  | 

1 Answer 1

Reset to default 0

Thanks for sharing the issues. I will share you how can you move the wp website another folder. Please follow my instruction step by step.

Step 1: Copy the all source code this folder location "http://localhost/Wordpress/buddha" file. Step 2: When you copy all file then Pleas paste the all source file this folder location "http://localhost/wp-buddha". Step 3: Create a new database from "http://localhost/phpmyadmin". Then import the database. Step 4: Open the config.php file and change the only database name.

define('DB_NAME', 'write_db_name_here');

/** MySQL database username */ define('DB_USER', 'root');

/** MySQL database password */ define('DB_PASSWORD', '');

Step 5: Please go to the database table "wp_options" change the URL link.

Please follow the screenshot instructions. Hopefully, it will be working fine.

https://drive.google/drive/folders/1RXW633LYUWuPdSBfj-UNKqCA_kzV--8N?usp=sharing

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748825954a314040.html

最新回复(0)