Ok so i moved hosting. Everything is working great except i cant get images to show up on the site. The only place that they show up is when you are editing the product on the image tab. No images are displayed on the list of products nor on the front end.
I have no idea what is going on here. If it helps at all when i inspect elements on the list of products page the "src" is blank but has alt text. But on the front end there is just nothing, no image tag at all.
I am not really sure where to start on this one. I have tried changing the path on the
define('DIR_IMAGE', BASE_DIR.'/image/');
To the absolute path on the server to the image directory, but that didn't help.
I have tried a few things that i found on google like deleting the cache directory.
Any ideas on something anything to try to resolve this issue?
The easiest way to make sure all of your details are correct is to do a "fresh install" to generate the configuration files again. Here's what you need to do
Back up your config.php and admin/config.php files to config.backup.php
Create a new database to use (this ensures that your original remains and can be used once your configs are created)
Clear the contents of your original config.php files and make sure they are writeable
Go to http://yoursite.com/install and fill in the details for the site, including the new database details NOT THE ORIGINALS
Once install is completed, Open the config.php and admin/config.php and change the database details at the bottom to match those of the originals in config.backup.php
Delete the new database and remove the config.backup.php files if everything has successfully been restored
If it were me and you would like your site not to go down. I would simply do a search on the code base for your old domain, and more importantly do a search in mysql for instances of your old domain.
Searching your codebase is easy using grep on command line. If you are not comfortable with command line download Sublime Text editor, download your code base and use Sublime to very quickly search the entire codebase.
Use phpmyadmin to search your database and use this snippet to replace your old domain with the new one: http://www.mediacollege.com/computer/database/mysql/find-replace.html
Hope that helps
I would like to point out you should always back up your website before doing this sort of change (that includes your database), and always test on a development instance where available!
Related
I've tried going through the Wordpress tutorial but I also don't know how to fill in the php config file this shows up:
Basically i've got everything except for php?
Thats url is wrong, use http://localhost/wordpressFolder/
unzip wordpress righ there
C:\wamp64\www\
example final folder structure, just like your capture
C:\wamp64\www\wordpress
In the browser use
http://localhost/wordpress/
off course start apache before and you need create a database first, here
http://localhost/phpmyadmin
Hi i moved my opencart website to new domain and theres huge problem i cant seem to figure out, i cant see any images, and i cant see translations on a lot of text.
Website is using template.
I did all the steps correctly:
export database
import to new database
changed configuration in config.php and admin/confing.php to new database
uploaded files to new server
Site is running on new domain but i cant see any images, and i cant see translations on a lot of text.
This is new domain: https://ecogreenbags.eu/
This is old one so you can see how it should look like: https://green-bags.sk/
Database is obviously running because all products are there, i can enter admininstration, all orders are there and everything, just not images and that text. I doublechecked if there is uploaded the language folders with that translations, everything is there, FTP is EXACT CLONE of old one except changed config.php files
I have no idea where is the problem. Any ideas ? Thanks a lot
Please confirm to recheck following two variable value is correct in both config file.
\config.php and \admin\config.php
define('DIR_IMAGE', '/home/example/public_html/opencart/image/');
define('DIR_LANGUAGE', '/home/example/public_html/opencart/catalog/language/');
you may double check your correct document root path in server.
Get correct doucment root path by echo following in config file.
echo $_SERVER["DOCUMENT_ROOT"];
Double check your config.php files both in root of site and folder admin. Its most likely to be a typo in the config.php in the absolute path to images.
May also be worth checking the file permissions\ownership of the image folder\files.
I've migrated my magento website from demo to live server, imported database, same files and everything from demo version, and changed url's in database, but for some reason products images which have been working on demo site are not showing up on live.
Now, i've tried:
Delete /var/cache, /var/sessions
Delete /media/cache
Move /media/catalog/product to /media/import and import products through admin panel using csv
Import products using csv
Replace strings in database
[UPDATE]: Forgot to mention that i've tried to chmod /media and /var folders recursively with 777 rights
Also, i've tried removing .htaccess file from /media folder - didn't made any difference.
The interesting thing is that on demo website, when i open url like: http://mydemowebsite/magento_demo/media/catalog/product/i/m/img_1204_image_name_1_1_1_1_1_1_1_1_1_1.jpg
i can see the image BUT when i go to /media/catalog/product/i/m/ i can't find img_1204... file anywhere. Crazy, huh... ?
and when i open the same url but with my live websites domain name - i have blank page.
[UPDATE]: I've tried editing get.php file, and it seems that when i try to access image through url on my live site, if i'll add echo "something" - the text will appear in the browser.
If i edit get.php on my demo website - text doesn't appear at all. Even if i add die('something') at the beginning of the file.
Can anyone explain me what is happening and how can i fix this ?
Thanks in advance!
Found the problem myself.
Thanks to everyone who tried to help, but the problem was:
FTP client shows only up to 10k images per folder. That folder had more than 10k files, and when i downloaded website files from demo server - i've downloaded only those 10k images per folder.
And that's why they didn't show up on live website
I have to update (move) actual database (exported as .sql from phpMyAdmin) to new one (already imported, same as old database). Problem is that, when I update file wp-config.php to new database (I just updated dbname, user, password and server), then it show up installation. When I set it back to old databse, it works OK. So, there is something that I need to update in DB? It seems like there would by any option about installation? Not sure, because new databse is well-filled.
So there is this neat tool I like to use when migrating the entire installation that I've developed locally.
Search Replace DB
Say you've developed everything locally, and even put the content in. Naturally WordPress will populate database with local links - something like
http://localhost/wp-content/uploads....
But when you move this to a new WordPress installation (clean), you cannot just import the exported .sql database, because it contains the old links with your localhost in it.
So that's why you first copy your old installation to the new server, then import the database, and then create a folder called sr where you put in the aforementioned script.
Now it's important not to open the newly copied WordPress installation once you've imported the database, because you'll get mixed links, and it could get messed up here.
Instead go to the /sr folder on your live site
http://www.yoursite.com/sr
And you'll see a search and replace screen.
There, just change
localhost -> www.yoursite.com
or whatever the equivalent to your localhost might be, in my case it's usually IP address of the test server I am developing.
Your database details like name, username and password should be pulled from the wp-config.php file.
Then just click dry run. This will show you all the replaced links in the database. Then you can inspect to ensure that you've correctly replaced the links - you only need to change the 'base' of the link. The path to uploads folder, for instance, should remain the same (remember, you've copied the entire wp-content folder to your live server).
If you think it's ok, do a live run, and let the script replace the links. After it's done delete it from the server - the entire /sr folder. Because if you leave it, someone could mess up your database.
After that, you can log in to your WordPress and all the content should be there exactly as you've left it on your localhost.
Hope this helps :)
You can use wp migrate db plugin to migrate you db for new server , after installation it require new server url and absolute path after that you and get original db to import .
I am very new to php (in fact about 2 days old). After getting ripped off by my last webhost I have decided to move my website to a different host. A friend has been helping me do this as he has a little info but we are now stuck and I have tried finding a soloution on google but most answers are way over my head. My site is a php site with a mysql database. We have moved the database and ftp'd the site and everything is now working on the new server except one thing - my site was designed originally to use clean urls? When I go to my shop page (ie: mywebsite.com and click on the shop link - mywebsite.com/shop/ (shows in the bottom left of my browser) I get a page not found error, yet when I type in the url mywebsite.com/shop.php the page displays fine. In addition, if I go to mywebsite.com/shop/shoes/ (another link which shows the preceding link in the bottom left hand corner) I get a page not found error. Also if I type in mywebsite.com/shop/shoes.php in the address bar I also get a page not found error even though the page shoes.php exists on the ftp server in a folder called templates - if I go to mywebsite.com/templates/shoes.php it shows up) I understand this is called clean urls and I need to add an .htaccess file to sort out the issue. I have looked on the ftp area of my old host and cannot find this file but have been told it is probably hidden. I have been told by my new provider that mod-rewrite is available on the server but I have no idea how to write this htaccess file. Can anyone please give me a step by step on how to do this as I am not a coder.
Additional Details
I have the following files in my root directory: index.php, shop.php, checkout.php, completed.php, contact.php ... I then have a folder called templates and in this folder I have: shoes.php. clothes.php, coats.php ...
The issue I am having is that most of the php files in my root directory already have href-links? pointing to places like mysite.com/shop/ and mysite.com/shop/shoes/ so when I open up the home page in my browser and hover over the links these are the addresses I see and when I click on the links I get page not found as the borwser must be looking for the links in the wrong place. (these links worked fine however on the last host I used). I understand I need an htaccess file to re-direct these links to the correct places. - ie the link for mysite.com/shop/shoes/ is actually linking to a page called shoes.php located in root/templates. I understand this method was used to tidy up the urls?? ie: instead of having mysite.com/templates/shoes.php the urls shows mysite.com/shop/shoes/. I have looked at the code within some of the php pages in the root and they all have lots of links to these 'false' addresses - ie: mysite.com/shop/shoes/ when the actual file should be at mysite.com/templates/shoes.php. I don't want to go through each file one at a time as they are hundreds of links, thus the reason for trying to make this htaccess file. Thanks for your time, Dave
Try to find an option on your FTP client software to show hidden files.
The name of this file is .htaccess (dot htaccess), that is probably the reason you're not seeing it. If the old site is working then the file is probably there. You could also contact somebody to send you the file via e-mail, IM, etc.
You do not need mod_rewrite or .htaccess for this.
Turn on multiviews in your Apache configuration. This will allow you to omit the .php extension from your URLs.