Joomla, move whole site to different domain name - url

I have a website built in joomla and it is live on the web at a url:
http://oldsite.com
I have been asked to move it to another url - domain name
http://newsite.com
How should I do this correctly without messing up the site and joomla installation??

I did not find any references in Joomla to the domain that it is running under, so there should be no need to change anything. If the site name changes as well, update /configuration.php.
In practice, you may find that there are links with fully qualified domain names in your content that you will have to change. Queries like the following can help you find them:
SELECT * FROM `jos_content`
WHERE `introtext` like '%mysite.gr%' or `fulltext` like '%mysite.gr%'
If you are on Linux, run the following from the site root directory to make sure that there are no other references in the code, such as hardcoded image paths in templates or the CSS, etc:
find . -exec grep -iH "mysite" {} \;
Check the .htaccess file of the site for any custom rules that require a domain name.
So the problem is reduced to changing the domain for an existing site, or to creating a new site and moving the Joomla installation in the file system, and/or creating a copy of the database. The exact steps depend on your environment.

In Addition to what cdonner said , you need to modify the configuration.php file and remove all ref to the old site
You also need to empty the (cache folder)

Are you moving the site to a new host or account or just changing the domain name?
If you are just changing the domain name -
All you really need to do is keep the old domain name pointed to the same Joomla install and add a rule in htaccess to update the domain name to the new one. This not only fixes any fully qualified domain names in links within your content or modules, it also fixes any backlinks that might exist from old domains. Here is what you need to add to htaccess -
RewriteCond %{HTTP_HOST} ^oldsite.com [NC]
RewriteRule ^(.*)$ http://www.newsite.com/$1 [L,R=301]
If you are moving the site to a new host, do as Hanny says and use Akeeba backup to move the site.
In both cases you will want to make sure the old domain is forwarding to the new one and you have the above htaccess rule set up to fix any links that might otherwise be broken.

An important thing to do when moving from one domain to another is to ensure that both the log_path and the tmp_path reflect the new server settings and that they are both writable by Apache. If you don't do that, then you will likely have problems logging in to the server.
You will also need to ensure that the cache and the administrator/cache folders are also writable by Apache since Joomla 3.6.+ is throwing a fatal error if you're using file caching and these 2 folders are not writable.

Related

Zend Framework 2 index.php in root folder

I am bulding a website with zend framework 2 and a URL typically looks like this:
domain.com/public/routename/action/params
In the skeleton application i don't have index.php by default, so i created one what basically includes the index.php from the public folder.(This is absolutely not the correct solution). What works but slows down the whole website, also the redirect plugin still redirects to domain.com/public/routename/action/params insetad of domain.com/routename/action/params
How could i skip the "public" in the URLs and get the redirect plugin to work?
Either you can do this from webserver from where you can point the public folder index.php so either point the domain to zf2 you should point to zf2/public/index.php
Another way is you can use htaccess and remove the public url
You should configure your web server so that it serves from public instead of the ZF2 root folder.
Not sure if you use IIS or apache or NGiNX, so without those details it is hard to say what you need to do exactly. But it should be easy to find a 'how to' for your particular web server.
It comes down to configuring what folder should be server for that particular virtual host.
Google can help you

Joomla base URL incorrectly formulated

Somehow my Joomla after an upgrade from 3.4.7 to 3.4.8 is not formulating the base URL properly. The base is supposed to be "www.domain.com/en-us/" for the English version of the site. It renders the following as the base url "www.domain.comhttp://www.domain.com/en-us/www.domain.com/"
further rendering the following url for resources, such as for "green_leaf.png": "www.domain.comhttp://www.domain.com/en-us/www.domain.com/images/green_leaf.png". Consequently, the pages full missing page elements.
SEF is enabled. Multi Language Filter Plugin is enabled. Any ideas what could be the cause of this besides, the configuration and the htaccess files? Those file are pretty standard.
The first things I would confirm are
- in system > global configuration > site -- is URL rewriting set to yes and have you renamed htaccess to .htaccess?
- if yes then ftp to your site, open configuration.php in a text editor, locate the line setting the $live_site variable and change to
public $live_site = 'http://www.domain.com';
Good luck!
I have tried your suggestion, to specify the $live_site variable in the configuration.php file as you indicate, even though I have also been recommended to leave it empty. The results were the same, the issue remains.
Here is the latest on this matter:
I have created a local copy of the site on my machine from a backup that was still Joomla 3.4.7. The same issue appears. I have reverted back to an earlier backup with Joomla 3.4.6 version of the site, and the site's page was restored to normal. This is with the same exact .htaccess and configuration.php across the 3 Joomla versions.
I have also tried with "Options +FollowSymLinks" commented out in the .htaccess file that came with J3.4.8. On both the live hosted site and a locally hosted copy, same exact results, namely:
Using Google Chrome (with Language Filter Enabled and set to Remove URL Language Code)
On the live hosted site:
www.domain . comhttp://www.domain.com/www.domain.com/
On the localhost copy of the site: localhost/domainfolder/localhost/domainfolder/http://localhost/domainfolder/localhost/domainfolder/domainfolder
So this issue might be pertaining to Joomla versions 3.4.7 and 3.4.8. The challenge is that 3.4.6 also has critical security vulnerabilities.
Also tried with Language Filter Disabled - Same result (Base URL formulated as above) with the difference that all the languages are displayed at the same time on the home page with the resources that are not found because of the faulty base url.

Joomla Site URL

I have a website on a 1and1 server. I have 2 domains on the package; the default url somenumbers.websitehome.co.uk and my actual URL.
The problem is, Joomla quotes the somoenumbers.websitehome.co.uk in system e-mails instead of my actual URL. They both point to the same directory I just don't want to give a stupid URL to my users.
I think I have narrowed it down to the $siteUrl variable but I'm not sure how to go from here.
Thanks
James
At first I thought this sounded largely like a DNS issue - but then you said you only have 1 Joomla installation and both domains point to that directory.
If they're both pointing to the same directory, then both domains will display the same Joomla installation. That is, unless you're checking to see where they are coming from and having the content display dynamically based upon how they got to your site - but from your comments I doubt you're doing that. How your domains are behaving is the expected response if you're pointing them both to the same directory.
If you want 2 sites on the same hosting? Setup 2 databases (or apply different prefix for each site and use 1 database) and set up each website in it's own directory.
Adjust the DNS of each domain name (and subdomain name) to point the appropriate directory.
From there, use the .htaccess file and SEF URL's to get rid of any indicator of the directory so that it displays the same as if the site was in the root directory.
That is the best way to accomplish what you're after - because from the sounds of it Joomla is doing exactly as it should, displaying correctly what is in the directory since both domain names point to the same directory.
$siteUrl should be left blank.

ModX: Changed to Friendly Alias URLS but now Wayfinder isnt working

I've used Wayfinder in my template, eg:
[[Wayfinder? &startId=`8` ]]
and it was working fine until I turned on friendly urls (by going: System>>System Settings>>User Friendly URLS)
Now none of my links work. On top of this if I click the 'View' button from a resource page or enter the full url into a browser I get a 404 error.
Am I missing something in this process?
(ps Im using Revo 2.1.3)
Have you configured your .htaccess file? It's required for friendly urls. When you install MODX it's named ht.access, so you'll need to rename it to .htaccess.
If you've installed MODX in a subfolder you'll also need to set it here:
RewriteBase /folder-name
As Sean suggested, you'll also need to clear your cache to have your Wayfinder menu rebuilt.
it's probably your cache - just clear it and you should be fine.

symfony: change application dir

I have ordinal symfony project which includes 2 applications: public and admin parts.
I need to move admin application files to project_path/web/admin. So if I call www.project.com/admin the admin project will be shown.
How should I configure project to allow that ?
Moving an app to the document root would create a security hole since ALL your app files would be accessible to anyone if you don't secure them in any way. If you do not like the default symfony project setup which uses url rewriting for a single app only (the public one ususally) and want to have "clean urls" in other apps as well, you can create subdomains for them and set the "no_script_name" parameter in settings.yml to "on". For example, this way you could have urls like http://myap.domain.com/nice/url/here. In your case, the public app could be on domain.com and the admin app on admin.domain.com. Of course, you would have to configure your Apache vhosts accordingly - this is not something that symfony does for you out of the box.
Definitely do NOT move your files into web/admin
A solution to your problem will very likely be found in the project_path/apps/frontend/config/routing.yml
I had a similar problem before. I created a frontend module and called it "admin" then put links in it that linked to myproject/backend.php/table etc....
you can use the routing file to make www.project.com/admin work
to learn more: http://www.symfony-project.org/book/1_2/09-Links-and-the-Routing-System
remember to enable module_rewrite in you http.conf

Resources