index.php in Wordpress showing PHP source code after moving site - wordpress

I moved my site to a new server and it all went smooth, but now when I access the home page I get this weird behavior:
When the URL is typed, the PHP source code of the file index.php is shown, not the normal content.
If I type the URL of any subpage, I can see the subpage perfectly, and
If I type www.myurl.com/?preview=true I can see the home page perfectly (this one has me lost).
The old version of the site was made with Wordpress too and it was working fine until I replaced it with this new installation.
I have no idea what is going on, any help will be greatly appreciated.

Related

Clean wordpress: 404 on home page onlyand only on root domain (in folder it is fine)

I have installed a clean vanilla Wordpress 6.0.2 to the root of my subdomain. The folder it was installed to was completely empty as was the database it was attached to.
The admin works fine as do the exmple page and post. But if I make one change and make the home page a static page, I get a 404 ending up at this king of url:
https://my.domain.com/404/?redirect_to=https%3A%2F%2Fmy.domain.com%2F
If I then repeat the exercise in a folder off the domain, e.g. "clean" and do the same, it works perfectly.
https://my.domain.com/clean/
I came across this when I realised my original site was doing the same and thought a clean install would fix it.

Wordpress redirecting to wrong homepage

I worked for a few days on XAMPP with a wordpress platform. After I bought a domain, I decided to use Duplicator plugin to transfer my whole wordpress snap to the new server. Everything is working just fine except for one single thing: whenever I go to my website, instead of visiting the actual page that should be "www.example.com/welcome" it redirects automatically to "www.example.com/wordpress". I made some research about it and discovered that usually wp is installed in a wordpress directory, but I completely made sure that:
on htaccess there is no /wordpress directory url
on index.php there is no /wordpress directory url
on wp-config there is no /wordpress directory both on SITE-URL and HOME
made sure that on the wp-admin config panel in the General section, the URLs are both set to the root directory.
For some unexplicable reason, everything is working fine, www.example.com/shop works for example, but if I set from the customization panel a page like "www.example.com/dummy" as homepage, then THAT page won't be found because it automatically redirects "dummy" to "/wordpress" which of course does not exist. You can type www.example.com and be redirected to www.example.com/wordpress and the same thing happens if you type www.example.com/dummy, since now that should be the homepage.
Can anyone explain me why is this happening? I searched everywhere but I can't find an answer.
I'm using the Storefront theme and Woocommerce plugin if that might help.

New wordpress dev site setup but all inks point to homepage

I've got a live Wordpress site that is working fine. Time for a few updates, so the guy hosting this site for us has created a new subdirectory, 'newdev', and copied the live site into it.
He said he's updated the database, and in my Dashboard-->Settings-->General, the WordPress Address (URL) has been updated to http://newdev.thecyclery.net.au (while the live site URL is http://thecyclery.net.au.
I find that I can open the homepage of the dev site OK, but if I click any links, it takes me to that page on the live site. E.g, I'm on http://newdev.thecyclery.net.au, then click 'Ride' and it takes me to http://thecyclery.net.au/ride
If I manually enter the URL for sub-pages (e.g. http://newdev.thecyclery.net.au/ride) it directs back to the DEV homepage.
I really need to be able to see my dev pages so I know that the work I'm doing is working and displaying correctly... Any suggestions?
Thanks, I hope I've provided enough info!!
Jon

Home page of Wordpress website not showing up

Really a newbie question here, since I just started working with Wordpress.
How do I get to the home page of my Wordpress website!? I am hosting a Wordpress website on my personal shared server, and when I go to www.nishantkelkar.org/wp-admin/about.php, it shows the typical admin panel that I'm used to seeing on Wordpress. Then I went about and created some test content (a Hello world post), and said "Publish". It says "Your post has been published" and gives me a link. When I click that link, I get redirected to the index page with an index of all my files in that folder! - http://www.nishantkelkar.org/?p=10&preview=true.
Am I doing something wrong? I just want to be able to see my freshly created content!
It appears as though you need to set your DirectoryIndex to index.php but it is difficult to say from just the information you provided.

Wordpress MU main sub-domain page not working, all other pages working

I'm testing out the Wordpress Network/Multiple Blog setup by turning on the feature in WordPress 3.0, but I've hit a problem.
I added the necessary code to the .htaccess file and wp-config, and I added the wildcard into cPanel (and with the registrar), and the admin area works fine, as do individual pages and stories, but the home page won't load.
Any suggestions?
The error page I get is the server's default error page which says "Default Website Page".
Home page: http://test.celebuscope.com/
Working inside article: http://test.celebuscope.com/2011/11/04/hello-world/
UPDATE: I gave up trying to fix the problem, but I suspect the issue is related to the base domain (www. versus none). I deleted the install and started from scratch and it worked fine.
Remove the /test/ folder on the server.
When you added subomains, the server mad ea folder, which overrides the virtual ones.

Resources