Ive recently ported a wp site to a new host, i did this by exporting the db and then updating it to the new host, its all come across pretty easily but the main problem im having is the img src urls have added an extra / to them.
They should look like :
http://mydomain.com/wp-content/uploads/2012/04/0007_cloud.png
but instead are like :
http://mydomain.com//wp-content/uploads/2012/04/0007_cloud.png
is there a way i can mass fix these broken urls ?
Yes, you can use "Search and replace tool". It will safely replace all strings in database.
Related
I have a problem with Wordpress, I changed my domain, but all media use the old domain.
For example :
I access my site with www.newdomain.fr
but in source code all src="" or media are with www.olddomaine.fr/wp-content/...
How can I change this ?
There are several options this can come from.
You probably have to migrate the whole database and it's serialized strings to the new domain name - for instance take a look at this Plugin Better Search Replace and replace the old domain name with the new one in your DB (don't forget to backup everything before you to this), this plugin should also handle the serialized data
If this doesn't resolve your issue you should take a look at your template code and even the css, there could be hard coded urls you have to replace (this should be considered as a bad practice and if this is the case you should build the template more dynamically)
I am helping out a friend with a slow WP. I installed hummingbird and it's telling me that some css files are slow to load (for example: https://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.2/TweenMax.min.js - it takes 390ms to load). I would like to store this file locally and see if the performance improves. The problems is that I'm not sure about how to locate the file that is actually requesting this css file. Any help is appreciated.
I suggest a sweet plugin I use called String locator. It will search the whole site for a string like TweenMax.min.js. It will also search by plugin. When it find it it gives options to edit straight to the file. Hope this helps.
Is this possible?
I use: WP latest version (3.3.2) and Cpanel Followed this tutorial to accomplish this: rsatechnologies.in/serve-image-media-files-from-cookie-less-domain.html
I've just managed to move all my post images in a "cookieless subdomain" and serve them in this format (path) when a user accesses the post: img.domain.com/year/month/file.jpg (1)
Now all my old images have this format but everytime I create a new post and upload an image, the image path shown is this: domain.com/img/year/month/file.jpg (2)
So what I'm trying to do is to force the site/server to use (1) instead of (2).
I've already tried everything in Media Settings tab, the only thing working is to write in the "Store uploads in this folder" and "Full path to files" fields the subdomain name ("img" that is).
Any suggestions?
I'm thinking is a Cpanel setting I'm doing wrong.
Many thanks!
The instruction posted here http://www.jafaloo.com/2011/09/11/host-your-wordpress-images-on-subdomain-for-better-page-loading/ is good. I have all my images at http://images.freedomwall.net/year/month/image.png instead of www.freedomwall.net/wp-content/uploads/year/month/image.png
I'd like to get WordPress to write directly to a file. I know I can do this with PHP, but WordPress deals directly with the database, and doesn't do static publishing by default.
I also know there are many caching plugins available, so this may come down to a cache plugin recommendation.
Here's the deal: I'm trying to use WordPress to generate some XML files that I need for another project. So, basically for data entry. Right now, my solution is to have the template put everything I need into a textarea. That's easy enough, but then I have to copy from it and paste that into a text file and save it. I'd love to skip that step and have WordPress make the files for me.
Can you recommend a plugin that would let me do this easily? It's OK if it comes down to a caching plugin, but that seems like it might be overkill. Does something simpler exist?
get the content of the post and feed it to the fput:
$myFile = "myXML.xml";
$fh = fopen($myFile, 'w') or die("There was an error, accessing the requested file.");
fwrite($fh, get_the_content());
fclose($fh);
I'm developing a site locally using xampp. The path the images are using is
/devsite/sites/default/files/icon_facebook.jpg
When I check out of the site on my server the path remains the same for the images, even though the image is now at
/~devsite/sites/default/files/icon_facebook.jpg
Are the image URLs just hard-coded by the wysiwyg including the wrong base path? Is there something I can do to make them work?
When you're using wysiwyg, the image path is saved along with the rest of the HTML, and the filters don't convert it. So under some conditions - especially if you're moving from a subdirectory to the HTML root - you'll have images that are misplaced.
The pathologic module might be of some help here. Otherwise you could use Views Bulk Operations to do a string_replace() operation your HTML fields.
Try setting the $base_url in sites/default/settings.php. I'm not sure how the WYSIWYG is setting images, but it's pretty standard that it should be using a path relative to the base url.