I migrated my magento website to a different server, following the steps described here. Everything went smoothly, except for the fact that when I load the page, the CSS won't load, and I just get the page in plain text.
I used firebug and noticed that the path the system is using to get to the CSS file doesn't exist in the FTP server. It starts with the 'minify' folder, which makes me think that something might be cached from the previous server.
An example:
my_site_url/minify/1281335374/skin/frontend/default/hellouno/css/styles.css
This path doesn't exist, not even in the previous server, so I'm thinking maybe these files are supposed to be generated on the fly? I'm really confused, any help will be very appreciated!
In my case, the problem was a missing Slash "/" at the end of the domain.
Use the following to get both rows:
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
Then update them manually and make sure the domain has it's final "/", otherwise it will merge the domain name with the following folder name.
You can check whether this is your condition if when doing inspect, you see a wrong path to CSS and JS.
Correct Config:
Incorrect Config Results in:
Remember to clear the var/cache folder.
I'm going to assume you cleared your cache out. If "not having CSS" makes this hard to do via the admin, just delete the
var/cache
folder.
Sometimes giving the CSS (or Javascript) merge settings a quick toggle from on, to off, to on again will force Magento to recalculate the paths.
System -> Developer -> CSS Settings
If you can't access this in the Admin, change the value manually in the database table core_config_data (identified by the path column having the value dev/css/merge_css_files), clear your cache and reload your page
Sounds like an issue with your .htaccess file. Minification rewrites are handled there. If you haven't already, make sure your .htaccess file came over in the transfer, and make the appropriate changes if directories or anything else has been changed.
Thanks its helped me i just forget to place / in the end of the path.
Before:
Base URL http://mywebsitename.com
After:
Base URL http://mywebsitename.com/
Its solved all skin/css and admin problem. Cheeers
I solved the issue, by changing the merge css options in the backend to no
It was a bit difficult to navigate through backend without css but managed to get there!
System > Configuration > Developer > CSS Settings
If you haven't changed your site information (url and such) in the backend (or in the database) after the migration, this is the likely problem.
http://www.siteground.com/tutorials/magento/magento_configuration.htm#base_url
for the database:
in the core_config_data table
change key "web/unsecure/base_url" to your site base url ex. http://yoursite.com
good luck!
Experienced same problem once.
The solution:
I'd forgotten to put trailing slashes at the end of my base_urls when I'd updated them
System > Configuration > General > Web > Unsecure
Base URL http://mybaseurl.com/
System > Configuration > General > Web > Unsecure
Base URL https://mybaseurl.com/
If you're Admin section is out of bounds you can also set this value in the database in the table core_config_data
Fields: web/unsecure/base_url and web/secure/base_url
Also: Remember to flush your cache after doing this.
Check permissions for the folders like app/etc, var, media folders. Try to give 755 permissions to those folders. Recently I have faced the same problem and I tried with this. Then my site works fine.
Change Permission Of Skin And Media Containing All Folder TO Give Permission 755 And File TO 644
Mine was also the forward slash ( / ) at the end of the url in the sql database. Cleared Cache and it worked perfect.
One answer that has not been given yet that turned out to be the solution to my problem:
When transferring the Magento store from 1 host to another, what usually isn't copied over is the VirtualHost entry. In my case I had to manually recreate this and wrongfully added AllowOverride None. This should be AllowOverride All in order for .htaccess files to be read and processed.
Related
I have set up an S3 bucket to host static files.
When using the website endpoint (http://.s3-website-us-east-1.amazonaws.com/): it forces me to set an index file. When the file isn't found, it throws an error instead of listing directory contents.
When using the s3 endpoint (.s3.amazonaws.com): I get an XML listing of the files, but I need an HTML listing that users can click the link to the file.
I have tried setting the permissions of all files and the bucket itself to "List" for "Everyone" in the AWS Console, but still no luck.
I have also tried some of the javascript alternatives, but they either don't work under the website url (that redirects to the index file) or just don't work at all. As a last resort, a collapsible javascript listing would be better than nothing, but I haven't found a good one.
Is this possible? If so, do I need to change permissions, ACL or something else?
I've created a simple bit of JS that creates a directory index in HTML style that you are looking for: https://github.com/rgrp/s3-bucket-listing
The README has specific instructions for handling Amazon S3 "website" buckets: https://github.com/rgrp/s3-bucket-listing#website-buckets
You can see a live example of the script in action on this s3 bucket (in website mode): http://data.openspending.org/
There is also this solution: https://github.com/caussourd/aws-s3-bucket-listing
Similar to https://github.com/rgrp/s3-bucket-listing but I couldn't make it work with Internet Explorer. So https://github.com/caussourd/aws-s3-bucket-listing works with IE and also add the possibility to order the files by names, size and date. On the downside, it doesn't follow folders: only the files at one level are displayed.
This might solve your problem. Security settings for Everyone group:
(you need the bucketexplorer.com software for this)
If you are sharing files of HTTP, you may or may not want people to be able to list the contents of a bucket (folder.) If you want the bucket contents to be listed when someone enters the bucket name (http://s3.amazonaws.com/bucket_name/), then edit the Access Control List and give the Everyone group the access level of Read (and do likewise with the contents of the bucket.) If you don’t want the bucket contents list-able but do want to share the file within it, disable Read access for the Everyone group for the bucket itself, and then enable Read access for the individual files within the bucket.
I created a much simpler solution. Just place the index.html file in root of your folder and it will do the job. No configuration required. https://github.com/prabhatsharma/s3-directorylisting
I had a similar problem and created a JavaScript-and-iframe solution that works pretty well for listing directories in S3 website files. You just have to drop a couple of .html files into the directory you want to list. You can find it here:
https://github.com/adam-p/s3-file-list-page
I found s3browser, which allowed me to set up a directory on the main web site that allowed browsing of the s3 bucket. It worked very well and was very easy to set up.
Using another approach base in pure JavaScript and AWS SDK JavaScript API. Not need PHP or other engine just pure web site (Apache or even IIS).
https://github.com/juvs/s3-bucket-browser
Not intent for deploy on your own bucket (for me, no make sense).
Using the new IAM Users from AWS you can provide more specific and secure access to your buckets. No need to publish your bucket to website and make all public.
If you want secure the access, you can use the conventional methods to authenticate users for your current web site.
Hope this help too!
This is my first time using Gitlab.
My repository url is myusername.gitlab.io/myrepo.
Opening that page gives me a 404 error, however when I open myusername.gitlab.io/myrepo/myindex.html, I get my index page.
Can someone tell me how I can set it so myusername.gitlab.io/myrepo loads myusername.gitlab.io/myrepo/myindex.html.
On a second note, I have seen other projects that use username.gitlab.iowithout the need for the/therepo` suffix.
Can anyone tell me how I can remove the suffix and just use the domain to access my repo.
Your server may prefer a default 'index' file to be loaded. In some cases, it may not handle the default file at all.
Rename you index file from myindex.html to index.html
First, to start, you can fork a pre-set project, with the right files in it (including an index.html): see gitlab.com/pages for examples, and "Getting started" for the steps
.
I really want to have myusername.github.io only
Second, that is a user website: make sure your repo (where you have forked/cloned the project example) is named after your GitLab login: <you>.gitlab.io.
So I have a Site created with Typo3. I also have a domain which is linked to the folder of the Typo3 Installation. www.example.org
I created a Subdomain and linked it to the same folder and used the Main Domain for something else.
But now everything on the Subdomain still has the URL Structure of the main site so when I open up sub.example.org all the Links and Images still have the URL from www.example.org/...
I exported the Database and replaced every URL with notepad++ and imported it again. But that didnt change anything. What do I do wrong?
There are two (three with realurl) places where you need to look if changing the domain of a TYPO3 site, if everything is done by the book and noone hardcoded the domain all over the place or something.
Usually you do not need to work in the database directly.
After doing the changes, make sure to clear the caches (install tool in 6.2+, "all caches" in earlier versions).
First:
There are two TypoScript settings that influence the generated URL: config.baseURL and config.absRefPrefix.
The recommended way to use those is to not set config.baseURL (would result in a <base> tag in the HTML <head>), and set config.absRefPrefix to the subpath where TYPO3 is, relative to the document root. If TYPO3 lies directly in the document root, set it to /.
Second:
In the database, there are "Domain Records". They are usually located on the root page of a site. Change those to the new domain.
Third (with realurl only):
Check the realurl configuration file, usually located in typo3conf/realurl_conf.php. Depending on your setup, the old domain name is used there and needs to be changed.
I FTP'd over the entire wordpress site and exported the Database and got it running on my localhost throught WAMP, but for some reason the links and folder are still pointing towards it's .com, and a 404 error comes up as well.
I suspect it has something to do with .htaccess but I'm not sure.. Can someone steer me in the right direction?
Did you update WordPress Address (URL) and Site Address (URL) under General > Settings?
They might still point to old domain.
Transferring the site over FTP to your local machine is the same as "moving" it to a new domain. Wordpress provides specific instructions for such a move which you can find #
http://codex.wordpress.org/Moving_WordPress
When Your Domain Name or URLs Change
When your domain name or URLs change - i.e. from http://example.com/blog to http://example.com, or http://example.com to http://newexample.com - there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.
If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have two options:
Only perform a search and replace on the wp_posts table.
Use the Search and Replace for WordPress Databases Script to safely change all instances. ( If you are a developer, use this option. It is a one step process as opposed to the 15-step procedure below )
I'm having trouble trying to rebuild my dev environment.
I've installed XAMPP and followed these steps:
Backup MYSQL DB.
Backup Home Directory.
Create DB with same user/dbname
Imported SQL file successfully, and imported home directory (and invisible files) into htdocs.
Verified that base_url and secure_base_url are set to "http://magento.local" (I have tried http://127.0.0.1, also)
Deleted all Cache/Sessions
How can i get http://magento.local to just display my local website, instead of reverting to the live URL?
I have edited my base_urls, and even the cookie url.
Magento is loading, noting that the URL you're using is not the same as what's configured, and redirecting you.
Here are the steps to edit the base URL in the Magento config.
I'm guessing you need to clear the Magento cache mentioned there.
The way I always do it is as follows...
Search the core_config_data table for ANY fields that are URLs, which you can do by running...
SELECT * FROM core_config_data WHERE value LIKE 'http%'
..or simply using phpMyAdmin if you have it available. One of our main sites has a total of about 8 rows to be updated (possibly not all required, could be left from older versions it was running on). If you see your live URL simply change it out for your local address.
Then open you cache folder and delete any files starting with mage--*. The thing that normally ends up catching me out at this point is file permissions. I don't know what OS you are using, so I can't tell you how to check, but if the apache user doesn't have write permissions to the cache folder the first time you accessed the site, Magento creates most of the files normally created in the DOCUMENT_ROOT/var folder in the OS's temp directory. For example, we use Mac OSX at work, it will create the cache files in /tmp/magento/, upon deleting that directory you should be good to go.
NB: You should probably update the file permssions of the var directory before viewing the site again, otherwise it will keep writing to the temp directory, which will trip you up again in the future.
Have you checked your htaccess file?
If your local magento store url is like http://magento/ then your Magento dont work, but if your url is like http://magento.local/ - magento store will be working fine.
I'd try clearing your Magento cache to start. Also note that some browsers cache redirects, so try accessing the site in a different browser or clearing the browser cache.
make sure you have set the base_url .you can actually edit it in the phpmyadmin look for the table with 'config_data' on its name.
localhost/text.html = test.html [correct]
of course it will be correct since it doesn't pass through the 'index.php' which works as the controller. remember that magento uses clean urls too.
www.yourdomain.com/index.php/name_for_the_page/
If your core_config_data is right, then this is very likely an issue with your local.xml file. Be sure your database information being supplied to this file is correct.
httpdocs/app/etc/local.xml
<default_setup>
<connection>
<host><![CDATA[localhost]]></host>
<username><![CDATA[your_username]]></username>
<password><![CDATA[your_password]]></password>
<dbname><![CDATA[your_db]]></dbname>
<initStatements><![CDATA[SET NAMES utf8]]></initStatements>
<model><![CDATA[mysql4]]></model>
<type><![CDATA[pdo_mysql]]></type>
<pdoType><![CDATA[]]></pdoType>
<active>1</active>
</connection>
</default_setup>
In this case your core_config_data is just fine, it's just not using the right core_config_data table. I ran into this same problem when my staging database was named differently than my local. A simple "Oops!" mistake.