CodeIgniter project localhost to live server transfer |
I want to transfer my CI project from localhost to a live server, so I copied all my project folders of CI to the public_html folder using FTP Client.
Here's how it look : I modified the config.php, base_url, .htaccess as needed. But nothing's working. If any problem in my .htaccess codes: PHP Code: RewriteEngine On config.php: Code: $config['base_url'] = 'http://xxxxxxxx.com/'; The Others directory contains my css/js/img files, and all are invoked using base_url(), so I don't think that's a problem.
This is how I do it for local and live server.
PHP Code: application you need to edit the index.php file and add ../ to the application and system folder names ../application ../system This way your application and system directories are in the root of your server. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
04-29-2015, 01:35 AM
(This post was last modified: 04-29-2015, 07:46 PM by John_Betong. Edit Reason: spelling: not my fortay ) As far as your online version not working try the following:
1. if you use a database, make sure your connection is OK.
2. temporarily remove/rename .htaccess file. (index.php should work) 3. check your error logs 4. check the php_errors file. 5. temporarily change your index.php ENVIRONMENT constant to 'development'.
I prefer having all my files in a single "version-001" directory. It does mean changing the following
$application_path = "version-001"; // default = 'application';
The main advantage is you can work on your next "version-002", upload and if there are any problems change back to your original version.
You can also try changing this:
PHP Code: $config['uri_protocol'] = 'AUTO'; To one of the other ones. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Are all of your filenames properly cased as mentioned in the user guide? It doesn't matter for some OS's (maybe your dev OS), but on others it does (maybe your production OS).
(04-30-2015, 09:48 AM)CroNiX Wrote: Are all of your filenames properly cased as mentioned in the user guide? It doesn't matter for some OS's (maybe your dev OS), but on others it does (maybe your production OS). Everything's good. I just can't figure out where is the problem. There's not enough tutorial on the internet also. Ok, a quick review what I did : folder tree : PHP Code: / index.html file: system and application folder path : ../system ../application .htaccess codes : PHP Code: RewriteEngine On base_url : my site address - http://xxxx.com/ index_page : removed autoload default controller : my Main controller which im working with database connection : credentials checked Ok
base_url should be like this: http://www.xxxx.com/
system and application folder path : ../system ../application needs to be updated in your index.php file index.php PHP Code: /* What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(04-30-2015, 10:56 PM)InsiteFX Wrote: base_url should be like this: http://www.xxxx.com/ Ya bro did the same !
put a test.php file on the same directory where the CI index.php is and try to call it from a browser
if you get a 404 you can be sure this isn't a CI problem at all rather than a wrong configured web server |
Welcome Guest, Not a member yet? Register Sign In |