• Resolved Pascal

    (@pascal183)


    Hi,
    I’ve read a quite a lot (for me!) regarding how to change the url of the wordpress site, but till now I’ve just broken my site.
    I have a wordpress installed locally (mylocalsite) and I’d like to put it on the web ([email protected]).
    I’ve tried to change WordPress Address (URL) and Site Address (URL) but each time the site was broken ??
    On another server I have a reverse proxy that I could use
    I’d like to expose only the web site, not the admin ; could I have Site Address on the web and WordPress Address locally only?
    Could you please give me which documentation I should follow to do it?
    Regards

Viewing 15 replies - 1 through 15 (of 17 total)
  • ([email protected]).

    This is an email address, not a website address. So if you’re using something like this (with the @ in it), then, of course, it’s going to break. There’s absolutely no way an address of this format will work.

    Thread Starter Pascal

    (@pascal183)

    ooop’s!!! too early this morning for me!

    my mistake the site will be like my.blabla.fr

    I should have written:

    I have a wordpress installed locally (mylocalsite) and I’d like to put it on the web (my.blabla.fr)

    Hi,

    You can follow steps below:
    1. Upload your site files to the server (if its Cpanel then put all files in public_html directory)

    2. Create a database on the server and save the database credentials to put into the wp-config.php file

    3. Download this utility from here

    4. upload this utility to the root directory (public_html) where it will ask for the database connection details and search url and replace url
    For eg. search url will be your local url like https://localhost/demo
    and replace url will be your server url like https://my.blabla.fr

    5. Run the utility

    6. Login to the backend and go through the settings->paramlink area

    7. Click save to generate/overwrite the .htaccess file with the latest domain name.

    8. Test your site.

    9. Delete the utility folder from root directory(public_html)

    Thread Starter Pascal

    (@pascal183)

    Thanks Ritesh for your reply,

    2 questions

    `1. Upload your site files to the server (if its Cpanel then put all files in public_html directory)</blockquote>

    Q1> If I have already the wp up and running on the target server do I have to create another one to do this 1. step?

    <blockquote>4. upload this utility to the root directory (public_html) where it will ask for the database connection details and search url and replace url
    For eg. search url will be your local url like https://localhost/demo
    and replace url will be your server url like https://my.blabla.fr`

    Q2> if I change all the local url to the my.blabla.fr url, I’ll also change the “WordPress Address (URL)”. Do I have to understand that the “WordPress Address (URL)” is always on the web?

    Sorry for the late reply: I’ve been away from the Intertubes ??

    Let’s get to your original question: do you want to migrate your local website to be hosted online with a web hosting provider? Or do you simply want to connect your domain to the website hosted on your local computer?

    If you want to migrate the site to an external web hosting provider, then please follow Ritesh Tailor’s guide. You may have to adapt it to your specific case (eg if your host doesn’t use cPanel).

    And stop reading now ??

    On the other hand, if you want to point my.blabla.fr to your computer and host your website locally, then read what follows.

    Have you done the necessary DNS config to map my.blabla.fr to your local computer/network? If not, then note that the challenge you’re having now is not really WordPress related at all. It’s a basic networking/DNS issue.

    In a nutshell, you need to map my.blabla.fr to the public IP address of whatever server is hosting the WordPress website. You’ll do this from the DNS manager for the domain blabla.fr.

    As I mentioned earlier, this is a fundamental step and unrelated to WordPress: you’d have to do the same even if this were a single static HTML site.

    The challenge is that most residential Internet connections are unsuitable for this purpose in two ways:

    1) They have a single public IP address configured on the ISP’s modem/router. All internal devices, possibly including your local computer running the WordPress site, have private IP addresses that can’t be reached from the internet.

    This problem is often solved with port forwarding.

    2) Even the single public IP address configured in the ISP’s modem/router often is not a fixed/static one: rather, it’s a dynamic address that changes periodically or any time the device reboots.

    This problem is often solved by using a 3rd-party dynamic DNS service provider.

    So what’s your setup like, and where are you in the process? What steps have you taken already as far as DNS host configuration for my.blabla.fr is concerned?

    Knowing what steps you’ve taken already will help us understand where the problem might be… and how best to help you.

    (And, by now you probably appreciate why 99% of websites are hosted externally with a hosting provider in a data center ?? )

    Standing by.

    • This reply was modified 1 year, 11 months ago by George Appiah.
    Thread Starter Pascal

    (@pascal183)

    George
    thanks for your reply!
    my answers

    “you want to point my.blabla.fr to your computer and host your website locally”
    => YES

    ” you need to map my.blabla.fr to the public IP address of whatever server is hosting the WordPress website”
    => sure, already done for other app hosted locally
    for instance here for the first version of my site https://atelier.bris.fr/
    (on Synology, all integrated, not good response time, but that’s show I can map my domain name to a local server) and I had some issues when changing the domain name ?
    So I’ve done again my site on another server and want to map it with my domain name

    I’m not sure it’s just a reverse proxy subject, do I have to do things on the WordPress config? I’ll do it on another domain name to see what happens w/o any change on WordPress

    Thread Starter Pascal

    (@pascal183)

    the address for the new site is
    https://atelier3.bris.fr/
    accessible
    the reverse proxy give it to wp on the server and after wp set the local server name
    So an error

    Thread Starter Pascal

    (@pascal183)

    some progress but ??
    I can reach the site https://atelier3.bris.fr/
    but it’s not beautiful ??
    When I’m on a page https://atelier3.bris.fr/mon-atelier/
    and I click Edit Page I go to a blank page
    https://atelier3.bris.fr/wp-admin/post.php?post=103&action=edit
    with a wrong link as if the Permalinks where lost
    Most of the admin menu are not working: Site health, media (empty), Smart Slider (not longer my slider)

    • This reply was modified 1 year, 11 months ago by Pascal.

    That’s because of these local URLs in your site: https://lamp1wp/

    Note that both WordPress URL and Site URL must be publicly accessible on the Internet. The two URLs are often the same, but they don’t have to be if they are properly configured and are publicly reachable.

    Unfortunately, I’m not familiar with the Synology platform to offer any input here on the routing, DNS, and web/proxy server configuration.

    • This reply was modified 1 year, 11 months ago by George Appiah.
    Thread Starter Pascal

    (@pascal183)

    Thanks George for your reply ??

    I think I have no longer https://lamp1wp/ but I need to double check…

    Where do you think I could have let one of those url?

    Note that both WordPrss URL and Site URL must be publicly accessible on the Internet

    ok, I have set https://atelier3.bris.fr/ for both

    I think I have no longer https://lamp1wp/ but I need to double check…

    If you view your public page’s HTML source, you’ll see it’s all over the place. These may have been saved in the database.

    Where do you think I could have let one of those url?

    When you change the two URLs, you may need to do a search-and-replace on the database to swap out all instances of the old URL with the new one. If you’re not comfortable with SQL syntax, the “Better Search and Replace” plugin can do this for you safely.

    Thread Starter Pascal

    (@pascal183)

    Thanks!
    huge progress…
    “Better Search and Replace” gave an error
    I already had “Search & Replace” but I’ve used it bad before
    I re did it no more lamp1wp
    and it seems I’m got almost everything, except the menu
    I’m going to do some checking…

    Thread Starter Pascal

    (@pascal183)

    A stupid question, as I’m not an html guy (I think you’ve already guess it!)
    Is it normal to see the “public page’s HTML source” or do have I do something to secure my site?

    • This reply was modified 1 year, 11 months ago by Pascal.

    A stupid question, as I’m not an html guy (I think you’ve already guess it!)
    Is it normal to see the “public page’s HTML source” or do have I do something to secure my site?

    Trust me on this: I’ve asked even more seemingly “stupid” questions before, even right here in these forums ??

    And no, this is not a security risk at all. In fact, this is exactly how 100% of all websites on the web work: the HTML, JavaScript, and CSS code are completely open for the browser to interpret (and anyone to inspect).

    Visit ANY website, and hit the CTRL + U keys on your keyboard (on Windows, or Option + Command + U on a Mac)… or right-click anywhere on any web page and select “View Page Source” (or something similar, depending on your browser)… and you’ll see the full code for the page.

    There are many historical, technical, and philosophical reasons for this that would take a number of lifetimes to discuss ??

    Thread Starter Pascal

    (@pascal183)

    George, thanks again ??

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘give domain to local wordpress’ is closed to new replies.