Zen Cart Logo
Forums / Search Engines / Quick SEO query...

Quick SEO query...

Views: 141

Results 1 to 12 of 12
14 Oct 2019, 8:38 AM
#1
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Quick SEO query...

[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here. And, remove this comment before actually posting!]

Hello,
I have recently exprted all my images in photoshop to be optimised for the web. However it had saved them all with underscores instead of dashes.
I have just searched google, unfortunately after re uploading! And people seem to be saying that google does not recognise an _ just a -. And go on to say that... a_lovely_image would be read as alovelyimage and should be a-lovely-image

Can someone give me advice, is this correct?

Thank you
Amy

14 Oct 2019, 3:19 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Quick SEO query...

Most references are from 5 or so years ago with only one that I found as late as 2018.

If you're concerned, just get a copy of spacetornado renamer. Makes changing the underscrore to dash easy.

14 Oct 2019, 3:23 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Quick SEO query...

I personally wouldn't worry about it, but that is a personal opinion not based on any seo information. What I can say is that if you decide that you need to change the naming of the file(s), you can get/upload your renamed file(s) and then modify the database to point to the new naming convention. Then whomever/whatever comes to the site will see that the image name has been changed and appropriately address/reference it.

If there becomes some sort of concern that the previously linked image isn't on the server, then both could remain though seems that then may run the risk of having two duplicate images having the same name...

14 Oct 2019, 3:34 PM
#4
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Quick SEO query...

THanks guy for the info. WIll look up the spacetornado Renamer tonight.

If I was to use that, that is just to rename my files right? I would still have to go into each product to re upload them with the new name?

Wasnt wanting to have two of the same images on there as it will get cluttered and I have 1000s of images!

Thanks
A

14 Oct 2019, 3:54 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Quick SEO query...

Something like this might work. Use after backup and testing. No guarantee from here as I have not tried it. Also, this code would be different if you have a table prefix like zen_.```
SELECT 'REPLACE' (products_image, "_", "-")
FROM products;

14 Oct 2019, 4:51 PM
#6
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Quick SEO query...

Ah ok, that should be very helpful!
Possibly a silly question, where do I put it . Is it in the SQL part i nthe admin?

THan you
Amy

14 Oct 2019, 6:16 PM
#7
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Quick SEO query...

Hi,
I had a look in php my admin and couldnt find Products_image or zen_products_image.
Am I in the wrong place?

Thank you
Amy

14 Oct 2019, 7:50 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Quick SEO query...

Based on the conversation, I have reservations about your doing this yourself. Messing with the database without thorough knowledge of its makeup is like trying to do your own open-heart surgery.

The images are in the products table. Again, that is if you DO NOT have an assigned prefix. The field (products_image) is not affected by a table prefix.

In the code```
SELECT 'REPLACE' (products_image, "_", "-")
FROM products;


SELECT and REPLACE are operators

products_image is the field containing the image name with the underscore.

FROM tells us where to look for the products_image.

products is the name of the table containing the products_image field.

The proper sequence for this process would be:
1. BACKUP the database
2. Rename all images with an underscore to use a hyphen instead.
3. Upload all renamed images to the proper folder.
4. BACKUP the database
5. Perform MySQL replace.
6. <https://www.zen-cart.com/content.php?6-donate>
15 Oct 2019, 10:37 AM
#9
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Quick SEO query...

Hi,
Thats fine, I have located that folder in my databases.
I was sure that my folders were zen_

Can I ask, would that have changed when I upgraded my zencart? or is that something that is to do with my host when I set it up? and it varies depending on who your host is?
I did a big complete upgrade from V1.3.9 to V 1.55, I know, huge gap!

Thanks
Amy

15 Oct 2019, 12:18 PM
#10
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Quick SEO query...

Hi,
I ran it but I cot this error...

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(products_image, "_", "-")
FROM products LIMIT 0, 25' at line 1

Do you need to know and version info relating to my database?

Thank you
Amy

15 Oct 2019, 3:44 PM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Quick SEO query...

rainbow_pixie_star:

Hi,
Thats fine, I have located that folder in my databases.
I was sure that my folders were zen_

Can I ask, would that have changed when I upgraded my zencart? or is that something that is to do with my host when I set it up? and it varies depending on who your host is?
I did a big complete upgrade from V1.3.9 to V 1.55, I know, huge gap!

Thanks
Amy
Generally speaking an upgrade process would keep the same database prefix (DB_PREFIX as identified in both admin/includes/configure.php and includes/configure.php); however, as part of the upgrade process it is also possible to rename that prefix. It may have initially been set by the host if an auto-installer were used, but it is/has been something asked about in the install process.

For understanding, one use of the DB_PREFIX is to support someone having one database (possibly because it costs extra to have additional) but to have the ability to have multiple stores use that same storage location through referencing a different set of tables. I personally install always with a DB_PREFIX so that it is easy to rename that prefix if necessary to support something else. It could be done without having an existing DB_PREFIX it makes the sql a little more complicated whent that same storage location already has another database in it as well.

15 Oct 2019, 4:48 PM
#12
rainbow_pixie_star avatar

rainbow_pixie_star

Zen Follower

Join Date:
Feb 2012
Posts:
427
Plugin Contributions:
0

Re: Quick SEO query...

I do run 2 websites, one is a sub domain within my main host. have seperate names for each within the database.

Could this be why I have an SQL error when I used the code (mentioned in the previous message)?

Thank you
Amy