Editing PHP for SEO - HELP!

:eek: Here’s my problem - hope someone has advice:

I have a new client who’s previous designer created his entire site in php (starting with index.php for the home page, about 50 pages in all). He has hired me to do SEO on all pages. Since there is no WYSIWYG editor for PHP and I can’t view any of the pages in Dreamweaver, any suggestions besides having to hard code the SEO into the site with something like Notepad?

You’ll have to forgive my SEO ignorance, but how in the world can you ‘hard code’ SEO ?

What exactly do you need to be able to do?

There is zero SEO on the site - it’s super unfriendly to the SE’s as it’s completely image based for all content and links, so I need to use META tags in head data, ALT tags (for images), TITLE tags (for links), etc.

Ah, I see. Thanks.

How would you do this if this wasn’t PHP based?

The fastest way since it’s just META/ALT/TITLE tags is to use a simple WYSIWYG editor. (I don’t need to made design or programming changes).

Dreamweaver, I heard, should display (unprocessed) PHP just fine. However, I would imagine you’re going to have some issues with locations where PHP outputs img tags for example.

Of course, if the application uses templates you may find the process quite simple. They should mainly consist of HTML anyways. :slight_smile:

flatlander this will be a little difficult if you don’t know any PHP, but not stupidly difficult.
If you open one of the PHP files in Dreamweaver design view won’t work, and a lot of the code will be unfamiliar, but you should be able to recognize segments of the HTML it outputs, and edit that in the code view.

For example:


//Bad SEO
$img_src = 'path/1234.jpg';
echo "<img src='$img_src'>";

You can probably recognize the HTML image tag in the PHP above.
You could then rename the file 1234.jpg to clcyopse-unicorn.jpg and change the code to:


$img_src = 'path/cyclopse-unicorn.jpg';
echo "<img src='$img_src' alt='Cyclopse and Unicorn'>";

If the PHP uses actual template files as Anthony mentioned there will be less PHP in your markup and it will be easier to edit it.

I agree, dreamweaver highlights the php code. I’m actually using pspad which is a free software and very good for that.
The point is also if the programmer used a cms or not, if he used some php framework like zend. etc.
You could post here an example of his code, so we can help you a little more :slight_smile: