I have a Wordpress site since a couple year hosted on a trusted domain. A couple weeks ago i forgot to renew my mySql database and obviously the site went down. To give my user a way to contact my shop i created another index.php and, after saving the old index.php given by the Wordpress theme, i deployed it on the server using Filezilla. Yesterday my domain was renewed and they told me everything is working, so i deleted my new index.php page and i deployed back the one got from the WP theme.
Now the home page works wonder, but if i try to show any other page i get a "Not Found - Requested URL was not found on this server". I tried to create another simple page to see if that works, and i get the same error. I didn't change anything in my file system bar index.php, and i'm pretty sure that's the one i used to have before my database went down.
Any ideas?
First of all, thanks #mevius for your answer. Unfortunatly that was one of the first things i tried and it didn't work. What i ended up doing was download the content of my MySql DB and exported all the tables into another DB that shared the host with the first one. After doing that i edited the wp-config file changing the DB name and my website works like a charm again. Thanks!
Related
I am unable to figure this out. I was creating a new page to display entries to a photo contest and it's not working for some reason I can't figure out. The new page is almost a clone of an existing page from an earlier photo contest that is working. After spending hours trying to figure it out, I'm stumped.
I'm running an Apache/2.4.38 (Debian) Server at home for testing web sites. In this case the file structure is like:
site/images/contestname/
where I have multiple contest names, each with its own directory. The directory permissions are the same in each case - the default for any directory created below "images", which is the default for any directory created in the "site".
The photos in all the directories all have the same ownership and permissions too - owner me, group www-data, with a+r (owner and group can also write).
The simplest manifestation of the problem is if I use a web browser to view the directory (http://mylocalsite/images/contestname/). This shows the list of files in the directory but when I try to view one, I get:
Forbidden
You don't have permission to access this resource.
It's only happening in this one directory. In all the others, I can click on a file name and see the image. I've tried recreating the directory and moving the images to the new one but that didn't change anything. It's also not browser related as it's happening with both Firefox and Chromium.
Does anyone have any idea on what the problem may be?
I've recently setup on my new VPS and successfully installed and imported my sql databse. However, after trying to click on any posts/pages, i get an error that the page can't be found.
Not Found
Logged in as admin, I can see all the posts and pages, yet clicking view just gives me the same message. The fact they are here means it must of imported them, just can't work out why I can't access them :S
Help!
If you can edit the posts in the admin, then you probably have the data and this is a url rewriting issue.
Try re-saving your permalinks, even without making a change.
If you can see the list of posts, but can't edit them then you probably have a bad import.
I FTP'd over the entire wordpress site and exported the Database and got it running on my localhost throught WAMP, but for some reason the links and folder are still pointing towards it's .com, and a 404 error comes up as well.
I suspect it has something to do with .htaccess but I'm not sure.. Can someone steer me in the right direction?
Did you update WordPress Address (URL) and Site Address (URL) under General > Settings?
They might still point to old domain.
Transferring the site over FTP to your local machine is the same as "moving" it to a new domain. Wordpress provides specific instructions for such a move which you can find #
http://codex.wordpress.org/Moving_WordPress
When Your Domain Name or URLs Change
When your domain name or URLs change - i.e. from http://example.com/blog to http://example.com, or http://example.com to http://newexample.com - there are additional concerns. The files and database can be moved, however references to the old domain name or location will remain in the database, and that can cause issues with links or theme display.
If you do a search and replace on your entire database to change the URLs, you can cause issues with data serialization, due to the fact that some themes and widgets store values with the length of your URL marked. When this changes, things break. To avoid that serialization issue, you have two options:
Only perform a search and replace on the wp_posts table.
Use the Search and Replace for WordPress Databases Script to safely change all instances. ( If you are a developer, use this option. It is a one step process as opposed to the 15-step procedure below )
I've developed a new wordpress website on a testing domain name on our server.
I had set the site up ready to go live... but I had to move the wordpress website onto another domain name that we are also hosting on our server.
So what I did was copy all root folder content from the testing domain name and pasted the content into the new domain name's root folder.
I then logged into wordpress, changed all the necessary settings like WORDPRESS URL and SITE ADDRESS URL as well as image absolute urls in each and every individual pages to make sure that I've got the right URL for everything.
When I click on MEDIA, I can see all the images like normal.
Great ... then I go and check the website live and I see that there are a lot of images that are missing! They are all in the MEDIA panel - but do not show up on the website!
I then double check that all images are pathed correctly ... and they all are.
Now why do SOME images show up and others don't?
I've even tried to add a new photo and use that photo in place of another photo that isn't showing up and that new photo doesn't even show up.
Where does my problem lie?
For example, 1 slideshow on my website which isn't showing images, give me an "image not found" error for a image:
Image not found: http://www.domain.com/wp-content/themes/natural
/lib/timthumb.php?src=http://www.domain.com/wp-content/uploads/2012/08/breakfast-gallery-011.jpg&w=610&h=0&zc=1
Ok I am going to answer my question with some advice.
It's clear that some of my images were 'hard coded' as devin mentioned as I could not find a logical reason for some not showing (even when I looked at the tabular data in MySQL) and because I'm not a database engineer / developer - I wasn't prepared to dive too deep into that with the possibility of causing further issues... so I decided to take down the entire wordpress site, create a new database, re-install wordpress and I imported an exported xml file that I created and saved (luckily) before 'migrating sites'.
Advice:
1) Whether you migrate a wordpress site or not, always backup your website regularly by creating an export of your wordpress structure. It may save you a lot of work in future.
2) If you're an amateur or beginner at development and MYSQL like myself, I'd suggest you create your wordpress site on the actual domain name you want it on. This will save you from 'migration' headaches as I've just experienced ... and a lot of time. Learn from my mistakes. Although there is probably a solution to my question above, it's out of my expertise / knowledge and could be out of yours too... so make it easy for yourself :)
The issue is not that the image URls are hardcoded only. The last portion of the URL is harcoded, but you will most likely have "/wp-content/" embedded in the URL which indicates that the image's URL string is dynamically created. I looked in my wp_postmeta table and there were all of the partial image URls ( like this - 2013/03/expanse2.jpg ). Now where is the beginning part of this URL and the domain name? The domain name is the part that is actually missing from the all of the image urls in my case. I dug into the database a little deeper using phpmyadmin ( but i recommend Webmin if you can get it up and running ). I ran into the "home" field in the "wp_options" table. Asked Google what a proper "home url" would be for wordpress, which brought me to this page ( http://codex.wordpress.org/Function_Reference/home_url ) , and this line was in there ( home_url() is located in wp-includes/link-template.php. ). Went to that file and found that it controls how URLs are built, but not uploaded image urls specifically. In the end i went into a page that had an image, looked at the advanced settings and found the image URL was just missing the domain. I used the wonderful search and replace script to repair it. Done
There is an oscommerce site that I maintain now. There are some links on the homepage like below when one visits the site first time.
http://website.com/index.php?cPath=2?osCsid=80b28bcd9ad38e38e7ded7e200f87b30
This click leads to Not Found error:
The requested URL /the-carriers-c-2 was not found on this server.
But if I go back on homepage and click then this link works without any problem.
On 2nd visit the URLs change to : http://website.com/the-carriers-c-2.html
This seems to be a very peculiar problem, I am new to oscommerce so not sure what the reason is.
Any help would be great.
What version of oscommerce are you running.
earlier versions of oscommerce required third party mods for SEO URLs. I agree with random, that is a generated url by the system.
you should have an .htaccess file in your root, it may be renaned or missing, also you need to have MOD URL REWRITE running on your apache web server so apache knows to handle these kinds of urls properly.