Drupal to Drupal Migration - drupal

I am attempting to migrate hosts and am having issues migrating from one Drupal instance to another. I have a multi-site install. I am attempting to maintain the files/code as well as databases. I have transferred the files from the instance of Drupal from my old server to the new server. I have exported the databases via phpmyadmin and imported them back in with cli. For some reason the homepages for my sites work but the internal pages do not. When i try to navigate to a page I get The requested URL was not found. I have installed and ran a new instance of drupal 6 (same version) on the new server and it seems to work fine. I assume it is something I am doing wrong with the porting process? Any help greatly appreciated!

Did you transfer the .htaccess file(s) too ?
Those are "hidden" (their name is starting with a '.'), and not shown by default by some FTP transfer software...
(I've seen exactly this problem a couple of days ago, and getting the .htaccess from the old server and putting it on the new one saved the day ^^ so maybe you're having this problem too...)

You could have avoided that by only migrating the sites/ directory. Extract the latest version on your new server and copy the modules, themes, and settings from your old site. Of course the database will need to move also.
This assumes your site is up to date and you haven't modified the drupal core. You may have a custom install profile to copy over too.

There are some important things to keep in mind before migrating from one Drupal instance to another
1. Optimize the tables before exporting the database.
a) By clearing all the temporary tables
b) By removing website cache.
For more details go through the following link:
http://goldapplesoftware.ca/blog/2011-05-reducing-drupals-disk-temporary-table-usage
2. Export database with command line so no data is lost.

Check your httpd/apache conf file... be sure to add:
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Related

Is doing drush archive-dump enough to transfer a drupal site to another server?

I am relatively new to Drupal. I have a drupal site on my staging but I would like to transfer the site to production server. My question is: Is doing drush archive-dump enough to do this? I tried doing this and it seems like the site is not loading the configurations correctly? I already executed the sql commands from the file generated by the dump.
There are three components to moving a Drupal site to another server:
Database
Code
Files (e.g. files uploaded by content creators; usually sites/all/public)
drush archive-dump is specifically there to grab all three and tar them. So yes, that is all the data you need. There can be other issues (e.g. server permissions; software versions; DB credentials; etc...)
To go live you need to:
Test your site in the same environment as production site have.
Move code to production server.
Move database to production server.
That's all.
Please read:
http://www.slideshare.net/erikwebb/the-basics-of-smart-drupal-deployment
https://www.drupal.org/best-practices
Almost. It seems that archive-dump will not include the Private Files Directory if it resides outside the DocumentRoot.
Some administrators will place the Private Files in a directory such as DOCROOT/sites/default/files/private/ and although Apache 2.x should deny access to this directory directly via .htaccess rules, placing this outside the DocumentRoot entirely ensures that protection regardless of HTTPD service...
So no, archive-dump is coming up short if you have Private Files outside your DocumentRoot directory.

MAMP Start Page Only Shows Index

I'm trying to install Wordpress on MAMP using this tutorial. When I start the MAMP server and go to the MAMP startup page, I see this index instead of a GUI. As a result, I can't access the PHPMyAdmin GUI (despite the PHPMyAdmin link) to create a database for Wordpress. Does anyone know what I might be doing wrong? I'm running OSX 10.9.5.
Try that url to access phpmyadmin
http://localhost:8888/phpmyadmin/
This is the directory listing that Apache provides in some cases. When a folder is requested, Apache looks in a folder for a file name matching the DirectoryIndex directive, which are often files such as index.php, index.html, home.htm, and so on. Since none of those exist here, the directory listing is shown.
Basically, something isn't right here with your MAMP install; either this URL is not designed to be accessed by you ever or your installation is incomplete. First, try loading http://localhost:8888 directly and see if that works any better for you. Failing that, I suggest you make a backup of any MAMP related files (databases, web pages, or configuration changes) and reinstall. One possible cause of this is if the MAMP package is not installed to /Applications/
In short, when you're using an all-in-one package like MAMP this shouldn't happen. You say that when you uninstalled and reinstalled that fixed the problem which is what I would have suggested anyway. It seems something went wrong with the installation and that should (and did) fix it.
I add the solution that helped me in the similar situation just in case someone later will face the same problem when after the Wordpress has been installed, a browser just show "Index of/" instead of the required site.
Check the following points:
There is 'index.php' file in the root folder of your project. (web server tries to open exactly this file).
If the file actually is located there, check the configuration of your web server. For example in my case my web server is Apache 2.4. After I added the directive "DirectoryIndex index.php" in the Apache configurations file (thereby saying to the server which file it should open if it received the address of the root folder) my problem was solved.

Drupal Export of Site Not Working For Subdirectory Levels Beyond Root Directory

I have to move an existing Drupal site from one server to another. I've done so by doing a mysql database export/import and copying over the files to the new server. On the new system, the root page comes up fine but if I try to go to any deeper directory levels I get a 404 Not Found Error.
so drupal.newserver.com -> works fine
but drupal.newserver.com/user -> gives me a 404 and happens,same for all subdirectories
Is there something that I'm missing that is part of a drupal export? Could it be related to the structure of the /sites directory which is under the webserver's docroot?- which has a folder named after the old server (ie drupal.oldserver.com but not drupal.newserver.com? Also, I noticed that there are _htaccess files and .hta files but not .htaccess files in the site files that I've copied over.
Sorry if I'm asking a bleedingly obvious question - I'm very new to Drupal. Thank you!
Check whether the clean url is enabled in your web server. To check try this:
drupal.newserver.com/?q=user.
Just to let anyone who might come across via a google search - I was able to get this to work . It turns out that while mod_rewrite was enabled, what I had to do was to enable the AllowOverride directive for the web directory in httpd.conf to be set to ‘All’. If it’s not set to this, the server won’t respect the .htaccess rules you put into the drupal directory. It’s been a while since I’ve worked with apache config files so it took a while to finally piece it together. The main breakthrough came when I realized that if I turned off clean-urls then the links worked but looked ugly and then was able to research clean_url.

WordPress hosted on Azure won't allow media file uploads due to bad temp folder

After recent upgrade to latest WordPress version, media uploads no longer work. They return missing temp folder error.
I found out that WP thinks that /wwwroot/wp-admin/ is the temp folder, that's where it is trying to send uploads.
I tried everything to force it to change within WordPress. Setting WP_TEMP_DIR, even tried rewriting core function that looks for temp folder in /wp-includes/text/Diff.php and setting static path.
Nothing works. I don't really know much about Azure, so it's been a pain in the butt.
My last resort is to install and use Azure Storage plugin for WP, but that's last resort.
Anyone can shed some light on this issue? Would greatly appreciate it.
UPDATE: Site is a Azure website, it does not use Azure instance.
http://www.windowsazure.com/en-us/home/features/web-sites/
I'm not to sure about Azure but you can change the tmp directory WordPress uses by using the command below. Make sure to make a folder in your home directory before doing so.
wp-config
define('WP_TEMP_DIR','/link-to-your-folder-you-just-made');
First of all, you should never store anything on an Azure instance, consider it volalite storage just like RAM - if the instance goes down or even gets randomly restarted you could literally get a brand new virtual machine with a new file system and lose everything.
That being said, you can safely RDP into the instance - create a directory (c:\temp for example) and as long as the IIS account has rights over the directory you won't have any issues using it as scratch storage. I would use Andy's approach above (I don't know wordpress, but I know Azure) and simply make sure that it points to a directory that you can use as temp and that the IIS user can safely use.
You may want to log in to the VM with RDP if only for the additional reason that it will give you great insight in how Azure structures the file system for the software it runs, you will see 3 drives and if memory serves one of them is purely a scratch drive that you can use. But it's not persistent, consider that it can get cleared at any moment.
Hope this helps,

Creating a MAMP Local Copy of a Drupal 6 Website

We're currently rebranding a client of ours and it's come the time to take the new brand to their website.
I've not much experience with Drupal other than the theming (I've themed a Drupal website in the past but not very familiar with the software's inner workings).
As this website is live, it's obviously not feasible for me to make any changes to the live environment, so I have downloaded the source files of the website to a local webserver (MAMP).
I also have a MySQL dump of the database.
I'm not sure what files need to be changed inside Drupal to allow access to the MAMP webserver. Could somebody point me in the right direction here?
How would I connect the database to the website, which files need modification?
I think the client is running Drupal 6.
Update:
I've installed the database and linked it up using the below line:
$db_url = 'mysql://root#localhost/databasename';
I've hidden databasename for anonymity.
As it's MAMP, the database has no password. When I load up the website I get an error that install.php is not found. It's not there because the website is already 'installed'.
I've also updated the $base_url to read:
$base_url = 'http://localhost:8888/foldername';
You only need to modify one file, 'sites/default/settings.php'; you'll just need to change the database connection string in there to match your new database settings. There may be a couple of other settings in there you need to tweak depending on the set up of the site (for example the $base_url or $cookie_domain).
Other than that everything in your installation should be relatively path-ed so there shouldn't be any need to make more changes.
i was facing same problem after couple of hours try i got solution : we have to check the DB (tick on list of databases in local host) [ observe this after DB list : Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server. so enable only the db you want to use] this will redirect to http://localhost:8888/foldername/install.php successfully :D :D

Resources