Drupal Multi Site Installation - Extract site - drupal

I have been landed with a Drupal installation that is on a server that is about to be taken down. My initial thought was to just transfer the contents of the server and then the import the sql database.
I have done this hundreds of times with WordPress installations and from reading up on Drupal it seemed to be essentially the same process.
What has thrown me now though is that upon delving into the Drupal installation is that there is a folder called /sites which contains loads of different websites. I am assuming this is a Drupal Multi Installation?
Can someone explain to me the basic process I would need to go through to get just one site out of this setup and put it on a new server?

It's pretty straightforward (in theory, at least):
Download a copy of Drupal, place it in the web root on the new server
Copy the database to the new server
Copy /sites/example.com on the old server to the new one, but rename it /sites/default
Copy /sites/all to the new server
Edit /sites/default/settings.php on the new server, update the db connection info to match the new database
The only caveat there is that the version of Drupal you download should match the version installed on the old server. If it's out of date, you should update ASAP as there have been some critical security patches recently.

Related

NGINX set-up server-block on existing domain names/sites

Good day!
Due intense desire to learn new things, I have tried setting up my very own new server which is in Linux and a hosting using Centos Web Panel at home. After the installation process, I then proceeded with the common installation of the necessary configurations including the WebServer. I chose NGINX because I've read that it is lighter and more scalable than Apache, and can be used as a web server or as a reverse proxy. After that I then proceeded with the creation of my new website with the domain I have. After creating my website, it was only then that I have read about Server Blocks in NGINX (Site I read).
My question is how can I implement the Server Block method to my existing website? Or should I simply remove my site and create a new one using the server block method?
Thanks in advance
UPDATE
I created my website by creating an account in User Accounts category on CWP where I declared my domain name and ip address. Then I was given prompted to User Account dashboard(IP:2082).
Uploading of files is through FTP using my ip/username/password/port which is usually located on /home/user_account/public_html. But after seeing the tutorials, everything is set to to /var/www/domain/public_html

Restore WordPress site without DB backup?

I'm trying to restore a WordPress website for which I have the files backup, but I don't have a DB backup on hand.
I managed to get the site up partially by restoring the backup in cPanel - all the site's pages are working now, but because there is no DB in place (wp-config.php points to what 'used to be' my DB) accessing site.com/wp-admin renders this error:
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
I know I made a huge mistake by not backing up my website DB.
Is there any way to be able to access wp-admin in this case? Can't I 'mock' the old DB with a new one? Anything to be able to access wp-admin.
Configure a core Wordpress with fresh installation point your current Wordpress files to the new database just got created
You should copy all the settings (from DB_NAME,DB_USER,DB_PASSWORD......AUTH_KEY,SECURE_AUTH_KEY..... till table_prefix) from your new installation wp-conf to old one
You would have lost almost all data stored in db like users etc however if your theme was more file based you should be able to se pages up
This is Triel and i think it should work to bes extent dont see any other way out of this scenario.
"Can't I 'mock' the old DB with a new one? Anything to be able to access wp-admin"
Simply Create a new mysql DB on your server and put its info in your wp-config.php file.

How to handle permalink of sites when migrating a wordpress website

What i want to do:
Develop a Wordpress-based website with a local Wordpress installation (and xampp).
Migrate this developed website on my webserver.
What's the problem:
After putting the website on the webserver each link in the navigation references to "127.0.0.1/wordpress/...".
I'm not even able to login to the Wordpress Backend on the webserver, because the "login.php" (or something) is also referenced on the localhost"
My Question:
Do any of you know how I can change this permalinks to the URL of the webserver the website is actually deployed on?
best regards
matt
edit:
Another thing that i noticed is, that although I changed the URL in the wp_posts table manually, this database entries are changed by wordpress, so next time, after opening the website, the URLs in the database contains the 127.0.0.1 part
When migrating the database from your local machine to a remote server, you should export your mysql database that is on your local machine to a file. Then perform a search and replace changing "127.0.0.1/wordpress/..." to "www.yourdomain.com/path/to/wordpress" and then import that file to your new mysql database.
Since you have already moved everything over, you can just export the database tables from your remote server to a file, do the search and replace on that, and reimport it. When exporting the database make sure to check "Add Drop Table / Drop View".
It's very simple, do everything you need in local, when you're ready to deploy, export your local database from phpMyAdmin, open the file and do "search and replace" your local path with your server path.
Chnage the connection string inside config.php and you're done.

Drupal Migration Issue - Install Screen Showing Instead of Site

We are migrating a bit of an old Drupal installation (6.x) from one hosting platform to another. Unfortunately due to political issues we are unable to upgrade the Drupal Core or modules prior to migration (eg. Needs to be done yesterday!).
Having copied all files across to the new server (in the identical location) and also re-imported the required databases and modified the settings.php file when we access the site all that is displayed is the Drupal installation screen.
I'm guessing it's some sort of path issue but there were no paths in the settings.php file. Following another post on here I realised that I hadn't brought across the .htaccess files but I have now done that and still no change.
Can anyone suggest anywhere I should be looking or perhaps a step I have missed?
We are moving from an Apache server to a LiteSpeed Web Server but I doubt that is an issue.
Any help anyone can provide would be hugely appreciated.
Thanks
Josh
The install screen is normally shown when Drupal can connect to the database server (so credentials seem to work), but does not find the existing Drupal database itself.
So you should check your database connection settings in settings.php and verify that it references the correct database. You should also verify that the database got migrated correctly, and that the user used by the Drupal instance has the proper access rights for the migrated database (although the latter would result in a different error message, IIRC).

drupal internal server error

I had created a folder in my site, and uploaded drupal in it. But when I access it, the following error is coming
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, webmaster#xxxxxx.xx and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
There are literally thousands of things that can be wrong
Do you have access to the webserver logs? Check /log/apache/error.log for errors.
Have you already configured drupal correctly? Normally, when you surf to the drupal root directory, you get presented with an installer message.
Does your server support PHP?
I'd recommend any of the following:
Checking that you meet the Drupal requirements
Re-uploading the whole Drupal folder
Testing the Drupal folder (is this a custom installation, or just straight from the drupal website?) on local LAMPP webserver.
Assuming you're trying to run Drupal for the first time (ie run the installer), have you followed the pre-install setup?
Here's Drupal's "Quick install guide for beginners": http://drupal.org/documentation/install/beginners
Since you've already uploaded the code and you have your domain set up, you can probably skip down to the big labelled "Create the configuration file and grant permissions".
The first thing in this section is to create your settings.php file. Drupal won't work without this. You also need to set its file permissions to that Drupal's installer can update it.
My guess is that this is why you're getting the error. Follow the instructions on the page I linked you to above and you should be okay.
You'll also need to have a database ready for use by Drupal. The Drupal installer will populate the DB tables, but you need to at least have the empty DB ready for it to use.
Hope that helps.

Resources