Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 584 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Concrete 5 - move C5 code, images and references up to docroot

#1
I have installed, configured and built a site on Concrete 5.5.2.1 and it is all working well. I have a problem that I have a URL of `www.ayrshireminis.com/concrete5.5.2.1`, for example, which is where the index.htm file sits. Is there a way that I can bring the code back up to the docroot without breaking all references such as image paths in the database for example?

Considering that the download of Concrete 5 includes this directory I am assuming that this is a common issue for some developers when using this CMS.
Reply

#2
I'm not sure why you have an "index.htm" file -- there is no such thing in a concrete5 installation. In general, though, you should be able to move the site without problems. A few possible exceptions would be:

* Depending on how exactly you're moving things, make sure you get every folder/file. For example, if you're using SSH and do something like `mv concrete5.5.2.1/* ./`, then you will miss the `.htaccess` file (because it's hidden). But if you're talking about index.htm files I am guessing you're on a Windows server instead of unix so perhaps this doesn't apply.

* In older versions of Concrete5, there was a setting in the `config/site.php` file called `DIR_REL` that you would need to change when you move the site. For example, if moving from the `concrete5.5.2.1` subdirectory up to the top level, you'd change `define('DIR_REL', '/concrete5.5.2.1`);` to `define('DIR_REL', '');`. So take a look in your `config/site.php` file, but if you don't see the `define('DIR_REL'...` line then don't worry about this step.

* If you manually entered full URL's to page links or images, you'll need to update those. Usually this isn't an issue (assuming you use the Concrete5 toolbar that sits above the Rich Text Editor controls -- e.g. "Insert Link to Page", "Insert Image", etc.). But if you notice dead links after you move the site, then either manually update the links by editing the blocks in question, or if you want to make sure you update them all in one fell swoop, you can run the following queries on your database (via PhpMyAdmin, for example):

UPDATE btContentLocal SET content = REPLACE(content, '/old/base/dir/', '/new/dir/') WHERE content LIKE '%/old/base/dir/%';
UPDATE btContentImage SET externalLink = REPLACE(externalLink, '/old/base/dir/', '/new/dir/') WHERE externalLink LIKE '%/old/base/dir/%';
UPDATE btSlideshowImg SET url = REPLACE(url, '/old/base/dir/', '/new/dir/') WHERE url LIKE '%/old/base/dir/%';

***Be careful with these queries!!*** You will need to change it so `/old/base/dir/` and `/new/dir/` make sense for your particular site. You should absolutely positively back up your database before running these queries otherwise you may **completely and utterly destroy your site** without any way to get it back!!!
Reply

#3
It is actually possible to move the code from a `ROOT/concrete5.5.2.1` directory back to the root _without_ running the queries above. I simply moved the code up a directory and everything worked.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through