I have 2 magento files in one server(linux) , one is live and other one is for testing. Both have different url. The testing magento is just setup by coping the live files and database. But I found out the testing magento will effect the live magento (for example I plugin the new template into testing magento , the live magento css and desgin will run also). Any idea about it?
Make sure that you have updated the URL in all of the config files AND the database. The easiest way to do this is to dump the database of the new site, find and replace the url of the original install with the new one then re-import it.
If you've been consistent with not hard coding links or images in CMS pages then the URL should only appear in these places:
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/update_site_url_in_core_config_data
You should use one magento on one server. Just create multiple stores in one. and redirect each store you what you want. www.example.com -> store 1; www.example1.com -> store 2 and so on. Magento works faster if you do that way. i have experience with multiple magento on one server. after more people start to use your store then server will start to lag or magento will start to work a lot slower.
this is happening because you have copied the database and files due to which in local.xml and in database table core_config there is information related to your live files, instead you should setup again the TESTING copy, just follow this steps.
take the backup of file local.xml from location /app/etc and after backup delete this file
Now after doing that just access the testing domain, now your setup for testing copy will start.
this will create new configuration information for testing copy
Related
What I'm trying to achieve is to have a local version on my Wordpress site on Linux in order to work locally offline.
So I downloaded my Wordpress site using Filezilla and place it in the htdocs directory. On my Mac it works, I can see the errors to fix in order to adapt it locally. However on Linux it doesn't seem to work the same way. With the same version on my site, instead of going on localhost, it redirects to my live site, which is odd given that everything has been done in the exact same way on the Mac.
Then I tried to reverse the process by installing a fresh copy of Wordpress and copying my custom theme and its plugins (WPML, Custom Field Pro and so on) in their right directories. The thing is I can fix the problem with my first method but with the latter it's getting tricky.
It has to work on Linux which is the machine that will be used in the office.
What do you guys suggest me to do from there? Any information you need please let me know.
Thank you very much in advance,
Julien
[EDIT]
I have changed the first and second row of wp-options in the DB to localhost instead of live URL.
You should try to look in database, Table: wp_options.
You would see siteurl and home.
Then you should change to localhost.
An easier way than manually copying the site is using a plugin called Duplicator, which you can find more info on below:
https://wordpress.org/plugins/duplicator/
This plugin makes it vastly easier to duplicate entire WordPress sites to local machines, without worrying about manually copying the database, core files, themes, etc.
go to phpmyadmin > your database > wp_options check the first two rows of wp_options table it should be siteurl and home you'll see your live site url there replace it with your localhost directory link.
http://example.com change it to localhost/yoursite
I'd like to do some changes to a modx revo install through a staging subdomain, with a separate database. What's the easiest way of doing this? I've been battling with this for two days.
I'm trying a new install now and replacing content, components and database content
I end up moving/duplicating MODX sites between live and staging subdomains several times per week. Here's how I do it.
MySQL
Create a new blank staging database
Make sure you MySQL user can access the new databse
Export/Backup your live database
Import the backup to your new/staging database
Files
Download the matching version of MODX from http://modx.com/download/previous-releases/ because you'll need the /setup/ directory (hopefully you didn't leave that on your server previously).
Copy the entire content of the 'public_html or 'www' folder over to the staging subdomain folder. Don't forget the .htaccess file which is sometimes hidden.
Upload the setup folder to your staging location on your server just like it would be found in a clean MODX install.
Update the three config.core.php files from the top directory, /connectors/, and /manager/ to update the "MODX_CORE_PATH" to the correct directory for staging.
Update the 'core/config/config.inc.php' file. You'll need to update the database details and every instance of your directory structure to match the new staging location.
Run Setup
Run by going to staging.domain.com/setup
If you get ant errors during setup it probably means that you missed something that needed updating in one of the inc.php files.
It's actually very similar to moving the site from one server to another except duplicating to a subdomain on the same server instead. MODX has instructions for moving to a new server at http://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server
There is another method to solve this problem.
Create new database & user for your sub site.
There is nice github repo. There you can find MODX install script which runs via cli. You'll get a new installed version of MODX in the end.
Install Vapor package from official repo to your old site. Then run vapor script from it via cli. It creates a new package with your whole site dump (You should check dependencies for xpdo objects in this script. For ex. you can copy all the stuff except users or anything else).
After all copy new package to core/packages at new site and install it.
Dump is ready :)
Okay, so I've searched everywhere and while I can find plenty of stuff about moving a Drupal install out of a subdirectory I can't find anything on moving one into a subdirectory. I've recently taken over this project and it was developed without me so I've been landed in it here.
The problem is that the site was developed in the root of a dev server and I now have someone who wants it in a subdir. I've changed the base url in the htaccess and I've tried manually changing references in the CSS and DB but I can't be sure I've caught everything (modules etc).
What I want to know is, is there a way to force every link relative to the root to be relative to root/example instead. Basically everything that was once at www.example.com is now at www.example.com/subdirectory.
Thanks.
There's two pieces to this. The first you've already done: configuring htaccess to set a base url that includes the subdirectory.
Unfortunately, you may have quite a few references in the node content (especially embedded images) that will stop working.
A relatively simple solution to this would be to include a <base href="foo.com/dir" /> tag in your site theme, but this isn't a great fix in the long term.
You can try modifying your database directly, through queries such as the following (use with care, backup your database ahead of time, etc):
UPDATE field_revision_body SET body_value = REPLACE(body_value, 'devdomain.com', 'proddomain.com/subdir') (add http:// into those queries)
You may also need to update the paths in your files table to reflect the new locations on disk, especially if you're using multisite.
Alternately, have you considered using the Backup & Migrate module to move content from the dev server to a new install at the new instance?
What are the best steps to take to prevent bugs and/or data loss in moving servers?
EDIT: Solved, but I should specify I mean in the typical shared hosting environment e.g. DreamHost or GoDaddy.
Bootstrap config is the smartest method (Newism has a free bootstrap config module). I think it works best on fresh installs myself, but ymmv.
If you've been given an existing EE system and need to move it, there are a few simple tools that can help:
REElocate: all the EE 2.x path and config options, in one place. Swap one URL for another in setup, check what's being set and push the button.
Greenery: Again, one module to rule them all. I've not used this but it's got a good rating.
So install, set permissions, move files and and DB, and then use either free module. If you find that not all the images or CSS instantly comes back online, check your template base paths (in template prefs) and permissions.
I'm also presuming you have access to the old DB. If not, and you can't add something simple like PHPMyAdmin to back it up, try:
Backup Pro(ish): A free backup module for files and db. Easy enough that you should introduce it to the site users (most never consider backups). All done through the EE CP. The zipped output can easily be moved to the new server.
The EE User Guide offers a reasonably extensive guide to Moving ExpressionEngine to Another Server and if you follow all of these steps then you will have everything you need to try again if any bugs or data loss occur.
Verify Server Compatibility
Synchronize Templates
Back-up Database and Files
Prepare the New Database
Copy Files and Folders
Verify File Permissions
Update database.php
Verify index.php and admin.php
Log In and Update Paths
Clear Caches
As suggested by Bitmanic, a dynamic config.php file helps with moving environments tremendously. Check out Leevi Graham's Config Bootstrap for a quick and simple solution. This is helpful for dev/staging/prod environments too!
I'd say the answer is the same as any other system -- export your entire database, and download all of your files (both system and anything uploaded by users - images, etc). Then, mirror this process by importing/uploading to the new server.
Before I run my export, I like to use the Deeploy Helper module to change all of my file paths in EE to the new server's settings.
Preventing data loss primarily revolves around the database and upload directories.
Does your website allow users to interact with the database? If so at some point you'll need to turn off EE to prevent DB changes. If not that you don't have too much to worry about as you can track and changes on the database end between the old and new servers.
Both Philip and Derek offer good advice for migrating EE. I've also found that having a bootstrap config file helps tremendously - especially since you can configure your file upload directories directly via config values now (as of EE2.4, I think).
For related information, please check out the answers to this similar Stack Overflow question.
I have live website running on MODx Revolution 2.1.3pl. Some days back I had to restore my entire site from backup. This messed up some file ownerships (for packages installed and images uploaded etc.) because in my server PHP runs as 'nobody' user which is different from my cPanel user.
Now I can't change much things on the server(like installing suPHP because its a shared server) and I don't know which all files are created by PHP, I decided to wipe the site clean and perform a clean install. My site has a large number of already published resources which is impossible to be posted into the new site individually.
Is there any way that I can transfer those resources to the new installation?
Why don't you create a mysql dump of your old site (with phpmyadmin or the like) and import this into a new database, which you use to run your new site from?
I've not tried it myself but provisioner seems to do (or at least claim to) what you need.