Change Wordpress Image URL - image

On my wordpress site all my images are showing up as broken links. They are also showing up as broken links in the media gallery in the wordpress backend.
I inspected the images using Google chrome and saw that they all show up like this:
<img src="http://firouzeh.co.uk/frouzeh/frouzeh/wp-content/uploads/sites/3/2013/04/Granulated-Persepolis-Ring-230x160.jpg">
there is a duplication of a file name in the path and to get the images to work I need the path to look like this:
<img src="http://firouzeh.co.uk/frouzeh/wp-content/uploads/sites/3/2013/04/Granulated-Persepolis-Ring-230x160.jpg">
I have searched through the database and cannot find where to change the path to my images, specifically I think there must be a field somewhere that is directing everything to www.firouzeh.co.uk/frouzeh where it should just be sending it to www.firouzeh.co.uk.
Does anyone know where to change the path?

If your URL settings are correct under Settings > General, then you could try using a Search and Replace plugin to update every occurrence in your database.
http://wordpress.org/plugins/search-and-replace/
Search for firouzeh.co.uk/frouzeh/frouzeh
Replace it with firouzeh.co.uk/frouzeh
Back up your site first :)
If you did just move your site from another location, I suggest using the Duplicator plugin, which handles all of the replacing.
http://wordpress.org/plugins/duplicator/

Use the same solution I wrote for here: https://stackoverflow.com/a/18023214/1946078
It is as follows:
When you move a Wordpress install, you need to also edit two fields in the database. Run this against your database in order to find the values that need to be edited:
SELECT * FROM `wp_options` WHERE option_name IN('siteurl', 'home');
If database access is not an option, another way to do this is by editing your wp-config.php file to include the following two lines:
define('WP_HOME','http://yoursite.com');
define('WP_SITEURL','http://yoursite.com');
Straight from http://codex.wordpress.org/Changing_The_Site_URL
The "Home" setting is the address you want people to type in their browser to reach your WordPress blog.
The "Site URL" setting is the address where your WordPress core files reside.

I used the solution from this article:
UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');
After changing the Site URL and WP home in the admin panel.

Related

Problem with joomla with photos and redirection

I deleted the pictures through the Joomla panel and I get such an error on the page as you can see in the picture. How to deal with this?
How to add redirection but without domain?
Your first issue about the pictures seems to be an issue with the component you're using, which is com_joomgallery in your case. When you delete the picture, it gets deleted but somehow its showing up in your JoomGallery image listing and so is the error.
Can you let me know from where you've deleted the photos? Was it from JoomGallery or from somewhere else?
If you haven't deleted them from JoomGallery then that's the reason for your issue, because JoomGallery database table still have those records and when it tries to list them its unable to find the thumbnails/images that you've deleted.
About your second question, how are you redirecting to external URL? If you're trying to open the external URL from an anchor tag try doing it like
Link
But you're using Route::_ to open the external URL, then don't. As Route::_ isn't used for external links but is meant only for internal URLs. If you want to open or redirect using Joomla, then try like this
$url = Uri::getInstance("//www.facebook.com");
$url->setScheme("https");
$externalURL = $url->toString();
echo "<a href='$externalURL'>Link</a><br>";
I hope this helps.

Url Rewrite of a CMS page in Magento

As a new magento developer I'm using a theme to develop my store. I want to change the URL key of CMS page about. I followed the steps written here but I can't find my layout file for about page on the theme directory or base directory for change XML URL tag.
How can I edit the layout file? Can anyone help me?
Actually that tutorial is a little confusing because there, they are showing an example of changing a URL for two different type of pages (CMS and system).
For changing the URL of a CMS page, like about in your case, it's enough that you proceed until point 12. In short:
First. you change the URL from: (main menu) CMS/Pages/Your_Page -> Url Key: newURL
Then, find the blocks that it is used (e.g footer) and change the URL accordingly.
Plus, in general working in Magento after changing things like page URLs you need to do a reindex and in case of using cache you have to refresh/remove your cached data. Both could be found under System tab (Cache Management & Index Management).

Magento : I am not able to upload picture when I add product

Error : Image type and information need to be specified for each store view.
I have tried cache clearing and it doesn't help for me.
I am using magento 1.8
just do below step as per link
http://mokamedia.ca/how-to-fix-image-type-and-information-needs-to-be-specified-for-each-store-view-in-magento-commerce/
Also try this
http://magentopaper.blogspot.in/2011/10/image-type-and-information-need-to-be.html
Try adding a php.ini file in your magento root directory and see whether it works:-
magic_quotes_gpc = off
short_open_tag = on
extension=pdo.so
extension=pdo_mysql.so
hope this will help you
I resolved this issue in 1.9.x using "Dull uploader" which removed the smart flash uploader in favor of a plain browser based file upload.
Image type and information need to be specified for each store view:
Go to File structure root/media/ dhl
Cut or delete the “dhl” folder from there.
Clear cache from Admin Panel and now do upload the images
Hope, Its working good.

Joomla: pages not found after copying site to another directory

I have copied a live joomla site. The original is found at [this][1] website. The copied one in found [here][2]. But all links (e.g. in the left navigation menu) result in 404 errors. The administrator backend is accessible and i can create new menu items in the copied one but they all result in 404 errors.
I did adjust the configuration.php file so var $tmp_path var $log_path point the right paths. i updated var $live_site = 'http://hosting01.hestronic.nl/~ijskoud2
The live_site was empty in the original configuration.php file.
Do i still need to run an update or something?
Thank you
PS joomla 1.5.25
Turn off search engine friendly url feature in System -> global configurations.
If you really want to enable SEF URL then you need to set your rewrite base according to your site dir in the server.
For $live_site variable, no need to modify it and keep it empty.
I ran into a similar issue where all of my links were doubling up. Fixed by prefixing http:// to $live_site
You don't need to do anything to $live_site, just leave it blank. The tmp and log paths are the only thing you need to touch. If you have SEF URLs turned on, you will also need to change the rewrite base from / to what ever the subdirectory is.
I disagree with my friend #Brent. Go to your DB to the menu table (by default its called jos_menu) and look for the "path" column. you probably need to manually fix the paths of all your menus to point to the new folder.
Check if the .htaccess file exists in your new folder. if not exists remove the sef url configuration from admin side.

Changing joomla site address

I've copied an existing joomla site from one domain to another, but when I hit the menu items it redirects to the old domain articles. Where is the setting to change this?
Thanks
Narkoz's answer isn't correct, there isn't an option to set your site domain in the joomla backend.
The problem isn't that joomla doesn't know your site URL, it gets that from you server, but rather the menu links are probably hard coded. Check your menu links in the backend and make sure the point to an "internal" link of some kind.
Set $live_site variable in your configuration.php file by adding this line:
$live_site = "http://www.example.com";
Export the database to SQL file then open it with a text editor and do a search/replace
Search : old-site-url.com
and replace it by : new-site-url.com
Save your file and import it to the database.

Resources