WordPress site not displaying some content on client side - php

I am setting up a WordPress site hosted on a home server. On the WordPress site, I have managed to upload a purchased template and import sample content. This means that the website should display exactly like the demo. From WordPress, when I view the website from the local machine (the home server), It displays all of the content that I uploaded. But when I connect to the website from any client, the backgrounds displays, but not the images. I used a plugin called cherryframework4.
http://74.208.12.48/index.php that is the link to the site... in looking at the console logs, I can see that most files filed to load. but all the files exist are in the directories.
it is also worth mentioning that i used cherrframework4 as a plugin to install the site

Happens regularly when moving from localhost to live site or from temporary URL to live. It's looking for images on the initial build platform (e.g. your machine or temporary URL) rather than from the live server:
It's looking for: localhost:8888/path-to-image/image.jpg
Should be looking for: domainname.com/path-to-image/image.jpg
Try using the search and replace plugin to search for instances of localhost:8888 (or whatever your machine is called) and replace it with the live domain name.
Be careful to check the URL in the code to extract and change only the part of the string that needs it.

Settings>general I changed the WordPress address and the site URL address to the ip address of my server. What has happening was that, because the url was set to http://localhost, the client machine was looking for the images in its own drive.

Related

How do I change a wordpress dev site url that was overwritten by live site backup

We have a dev site www.dev.site.co.za & a live site www.site.co.za.
I wanted the dev site updated to be a current replica of the live site, so our hosting provider copied it over.
But now when if you go to www.dev.site.co.za, you are "redirected" to www.site.co.za. I have tried changing the siteurl in phpmyadmin but that hasn't resolved the issue.
Is there somewhere else the url needs to corrected and is there anything else I need to do to make sure the dev site is a completely separate environment to the live site so I can safely fiddle without damaging the live site?
wordpress not only uses the database in PHPMyAdmin for the url.
As mentioned in the official documentation there are several files that can include the url:
the wp-config.php (wordpress file)
the functions.php (theme file)
Check these and have a look for the url address.
Have a look at the .htaccess file!
Also:
Helpful for that issue (e.g. restoring a wordpress page on another server) is the plugin BackupBuddy. It is one of the most well known plugins for wordpress. (Know right now that it is a paid version! But as always there are others with the functionality).
It allows you to backup and restore your page on a new system. You can initially set your new desired address for the system then.
Maybe it is worth a look!
For rectifying your dev site issue, you can try this.
Following is the URL to a simple utility via which you can replace some value in your database with some desired value.
https://github.com/interconnectit/Search-Replace-DB
Download the utility (zip file).
Upload it to your dev site root location and unzip it there. So that the the URL of the unzipped folder becomes: www.dev.site.co.za/Search-Replace-DB-master/.
Visiting that URL will show you the screen with options to replace some values in your database with desired values.
This utility automatically selected the connected database.
Put the URL of your live site in the field to replace.
Put the URL of your dev site in the field to replace with.
Choose the Dry Run option to see what all tables and columns will be affected.
Once you see the results and know what is changing then you the click on Live Run.
Clicking on Live Run will change all the URL of your live site in dev site database with URL of your dev site.
Once the changes are done you can delete this folder.
Hope this will at least resolve the problem of redirection of dev site to live site.
Once the new site is built you can then migrate(move, copy) it to the live site's location. There are some tools out there to help with moving the site you can use once the site is done. Some require a plugin to be installed to do that though. For example magicmigration can be used to move the completed site to a new location (that one specifically doesn't take extra installs). It is also possible to manually migrate the site though depending on the situation and know-how that can be a bit much for some people.

OpenCart 1.5 skips a part of url

My client has a website built using open cart 1.5. He wants me to create a folder inside of it and make a test website using the existing site. I copied everything from the live site and pasted it inside a folder in the live site. Every link in the test website is similar to the links in the live website.
href structure of the live: href="www.site.com/resources"
href stucture of the test site: href="www.site.com/folder_name/resources"
I noticed that when I clicked on a link in the test website, it redirects me to the live website even though I changed the link's href to something like this: href="www.site.com/folder_inside_the_live/resources".
Why does opencart ignore the /folder_inside_the_live/?
I noticed that the live site has no .htaccess and I am afraid to create one as it might affect the live site entirely.
If OpenCart has an installer, you may wish to check for any config/settings files, where it might have set-up the base for links. Reading this OpenCart docs page, it looks like these config files are at /filePathToOpenCart/config.php and /filePathToOpenCart/admin/config.php. Have a look at those, and see if they contain anything that could help. They are most likely just storing database names/passwords, but it is probably a good idea to check it anyway.

local php code works wrong in php based theme in wordpress

I'm super new with php/wordpress (first day today) and I trying to deploy application on my local machine (Windows 7/ 64bit's if that's matter). SO I get the sources - which is like a theme, deploy wordpress locally with xampp, and put my source folder to wp-content/themes
So now it works, but work's wrong. Some element's like header menu do not render, some text missed. And when I trying to do some navigation like localsite/register it realod the same page, but make page title "page not found", but register.php in the folder. This is work the same for any other pages except login. When hit localsite/login it redirect's me to wp-login.php
I do not need to change it somehow, just make local version looks and works the same as live. Does anyone have an idea why could that be and what should I do to fix it?
Probably your pages do not executes because you do not create it like pages in CMS. That's also the reason why local version could looks different from the server one.
So you need to login to remote server admin panel and replicate all stuff from live server with the same way on your local server. I mean add pages, articles, configure menus, widgets, etc. And then your local version will be look and feel the same.

Display a page on website located on different server

I have a php website running on an IIS8 server. I also have a WordPress blog hosted on another server. I would like for the blog to show up under the same domain as the main site.
For example, www.mysite.com is hosted on server A. The blog is hosted on server B. The domain name is set to server A. When a user navigates to www.mysite.com they get the main website hosted on server A. When the user navigates to www.mysite.com/posts, I need them to see the blog hosted on server B. Is this possible? I'm not sure if I can use a cname, if I need to configure something in IIS or if there is another way to accomplish this.
As you describe it, www.mysite.com/blog might not be the easiest or cleanest solution. If you are able to, using a sub-domain would be better.
The blog would end up at blog.mysite.com or whatever you want. Site A would still be at www.mysite.com.
Well I can see there being several options here. The iframe suggestion I don't think quite fits your requirement of typing a URL and then it redirecting.
You could add a simple domain redirect for example mysite.com/posts redirects too Server B. You could look at using rewirte URL's on IIS. See the URL rewrite extension here.
Yes, you can simply call an API from server B that will fetch blog data and return the output
Create an API function on Server A that returns the blog post data (in array/object format)

Theme Not Working When Visited from Separate Computer on New Wordpress Blog

I am using WAMP with a new WordPress blog. I am hosting this on a local computer. Upon my arrival at this URL from a separate computer a lack of CSS appearance becomes evident. To clarify myself further, when I view this site on another computational device designed to compute the CSS that ought to load does not perform its designated task. Perhaps the scripts are not performing their tasks? PHP scripts that WordPress uses may have errors impairing the overall performance from an external device. My English, please excuse, and have my deepest respect comrades.
Maybe you installed your blog with an url like http://localhost/blog
In the WordPress database the url is used to find the link for CSS, theme files, etc...
Accessing from another computer with your ip address (let's say that is 192.168.1.5) will break the css, because, if you look at the code of your wordpress page you'll see links pointing to localhost, that has no meaning for the other machine (or better, for the other machine means "myself", so it will look for css on its filesystem and not on your remote pc).
Sorry for the bad english. :P

Categories