0

I am newbie in wordpress and I am learning it. I have created a website which is running beautifully in localhost. After hosting it on server it is not able to load any images and css.

This is my website

I Don't know how to set check the path of all images and css.

some advices and suggestions will help me a lot.

Thanks in advance.!!

3 Answers 3

1

You need to replace the instances of localhost(localhost/wordpress/) with your domain (www.scaeducation.org) using database and replace script. Here is what you need to do:

1). Download the DB search and replace script at: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

2). Upload via FTP to root of hosting account for your domain.

3). Navigate to the script path thru your browser and follow the steps to replace the strings.

Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

0

Your linked files are pointing your local host. They should point to the files on your web server. Change //localhost/wordpress/ to //www.scaeducation.org/

Make sure to check in your admin area that: Settings > General > WordPress Address = http://www.scaeducation.org

4 Comments

In which file all path should I change?
Depends. You need all the linked files in your <head> to point to your webserver files. Depending on the theme it can be hard coded in the header.php file. Ideally the theme will have most of the linked files in the <head> of the document and enqueued through the functions.php file. Make sure in the admin area that: Settings > General > WordPress Address = http://www.scaeducation.org
There are 2 addresses here. one is wordpress and other is site address. Do I need to change other one also? Sorry If I am asking silly questions but I am just started learning!!
I believe in your case, they should be the same. codex.wordpress.org/Changing_The_Site_URL. If either say "localhost" definitely change them.
0

When linking to your resources in your theme, you can use the get_template_directory_uri() function to print the working directory of your theme relative to its present domain. So if you want an image in your images folder of your theme you can do something like this:

<img src="<?php echo get_template_directory_uri();?>/images/sample.jpg>

This will render properly as localhost/wp-content/themes/my-theme/images/sample.jpg if you are running local, or http://www.scaeducation.org/wp-content/themes/my-theme/images/sample.jpg if you are running live.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.